-
-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy pathdocker-compose.yml
65 lines (60 loc) · 1.91 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: '3.3'
services:
leantime_db:
image: mysql:8.4
container_name: mysql_leantime
volumes:
- db_data:/var/lib/mysql
restart: unless-stopped
env_file: ./.env # Environment file with settings
networks:
- leantime-net
command: --character-set-server=UTF8MB4 --collation-server=UTF8MB4_unicode_ci
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 30s
timeout: 10s
retries: 3
leantime:
image: leantime/leantime:${LEAN_VERSION:-latest}
#user: "www-data" # Run as non-root user
restart: unless-stopped
env_file: ./.env # Environment file with settings
# Add security options
security_opt:
- no-new-privileges:true
# Add capabilities
cap_add:
# - CAP_NET_BIND_SERVICE
- CAP_CHOWN
- CAP_SETGID
- CAP_SETUID
ports:
- "${LEAN_PORT:-8080}:8080"
networks:
- leantime-net
volumes:
- public_userfiles:/var/www/html/public/userfiles # Volume to store public files, logo etc
- userfiles:/var/www/html/userfiles # Original volume name for compatibility
- plugins:/var/www/html/app/Plugins # Plugin storage
- logs:/var/www/html/storage/logs # Log storage
depends_on:
leantime_db:
condition: service_healthy
# Add a helper container for volume permissions
# Run via docker compose --profile mysql_helper up -d
mysql_helper:
image: mysql:8.4
command: chown -R mysql:mysql /var/lib/mysql
volumes:
- db_data:/var/lib/mysql
user: root
profiles: [ "helper" ]
volumes:
db_data:
userfiles: # New volume for public files
public_userfiles:
plugins:
logs:
networks:
leantime-net: