-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (51 loc) · 1.77 KB
/
docker-compose.yml
File metadata and controls
64 lines (51 loc) · 1.77 KB
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
# ─────────────────────────────────────────────────────────────────────────────
# ServerCommander OS — Docker Compose
# ─────────────────────────────────────────────────────────────────────────────
services:
app:
build:
context: .
dockerfile: Dockerfile
image: servercommander-os:latest
container_name: servercommander
restart: unless-stopped
ports:
- "${HOST_PORT:-3000}:3000"
env_file:
- .env
environment:
- NODE_ENV=production
- PORT=3000
- DATABASE_URL=file:/app/data/servercommander.db
- DOCKER_SOCKET=/var/run/docker.sock
- HOST_FS_MOUNT=/host_system
volumes:
# Persist SQLite database
- sc_data:/app/data
# Docker socket — allows managing host containers
- /var/run/docker.sock:/var/run/docker.sock:ro
# Host filesystem — mounted read-write; RBAC enforces per-path access
- /:/host_system:rslave
# Needs access to docker.sock (group docker = gid 999 typically)
group_add:
- "999"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/login"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
security_opt:
- no-new-privileges:true
labels:
- "com.servercommander.managed=true"
volumes:
sc_data:
driver: local
labels:
- "com.servercommander.volume=data"