forked from Kpa-clawbot/CoreScope
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (106 loc) · 3.36 KB
/
docker-compose.yml
File metadata and controls
112 lines (106 loc) · 3.36 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# All container config lives here. manage.sh is just a wrapper around docker compose.
# Override defaults via .env or environment variables.
# CRITICAL: All data mounts use bind mounts (~/path), NOT named volumes.
# This ensures the DB and theme are visible on the host filesystem for backup.
services:
dev:
image: corescope:latest
container_name: corescope-dev
restart: unless-stopped
stop_grace_period: 30s
stop_signal: SIGTERM
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "3001:80"
volumes:
- ./caddy-config/Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy-config/supervisord-dev.conf:/etc/supervisor/conf.d/supervisord.conf:ro
- ${PROD_DATA_DIR:-~/meshcore-data}:/app/data
- caddy-data-dev:/data/caddy
environment:
- NODE_ENV=development
- MESHCORE_API_KEY=${MESHCORE_API_KEY}
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/stats"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
umami:
image: ghcr.io/umami-software/umami:postgresql-latest
container_name: corescope-umami
restart: unless-stopped
ports:
- "3002:3000"
environment:
DATABASE_URL: postgresql://umami:umami@umami-db:5432/umami
DATABASE_TYPE: postgresql
APP_SECRET: ae26240cc4646c9a6c2b1a75e3052a36dd36174bcb0b092f618561cc433342b8
BASE_PATH: ""
depends_on:
umami-db:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/api/heartbeat"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
umami-db:
image: postgres:16-alpine
container_name: corescope-umami-db
restart: unless-stopped
environment:
POSTGRES_DB: umami
POSTGRES_USER: umami
POSTGRES_PASSWORD: umami
volumes:
- ${PROD_DATA_DIR:-~/meshcore-data}/umami-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "umami", "-d", "umami"]
interval: 10s
timeout: 5s
retries: 5
master:
image: corescope:latest
container_name: corescope-master
restart: unless-stopped
stop_grace_period: 30s
stop_signal: SIGTERM
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "80:80"
- "443:443"
volumes:
- ./caddy-config/Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy-config/maintenance.html:/srv/maintenance.html:ro
- ${PROD_DATA_DIR:-~/meshcore-data}:/app/data
- caddy-data-master:/data/caddy
environment:
- NODE_ENV=production
- MESHCORE_API_KEY=${MESHCORE_API_KEY}
- DISABLE_MOSQUITTO=true
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/stats"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
mosquitto:
image: eclipse-mosquitto:2
container_name: corescope-mosquitto
restart: unless-stopped
ports:
- "1883:1883"
- "${PROD_MQTT_PORT:-9001}:9001"
volumes:
- ${PROD_DATA_DIR:-~/meshcore-data}/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
- ${PROD_DATA_DIR:-~/meshcore-data}/passwd:/mosquitto/config/passwd:ro
- mosquitto-data:/mosquitto/data
volumes:
# Named volumes for Caddy TLS certificates (not user data — managed by Caddy internally)
mosquitto-data:
caddy-data-dev:
caddy-data-master: