-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
71 lines (68 loc) · 1.9 KB
/
Copy pathdocker-compose.example.yml
File metadata and controls
71 lines (68 loc) · 1.9 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
services:
diadem:
image: ghcr.io/ccev/diadem:latest
container_name: diadem
restart: unless-stopped
ports:
- "${DIADEM_PORT:-3900}:3900"
environment:
- DIADEM_TARGET=${DIADEM_TARGET:-runtime}
- HOST=0.0.0.0
- PORT=3900
volumes:
# Required: Mount your config file (both paths needed for runtime and db:push)
- ./config/config.toml:/app/build/server/config.toml:ro
- ./config/config.toml:/app/src/lib/server/config.toml:ro
# Optional: Persistent logs
- diadem-logs:/app/logs
depends_on:
diadem-db:
condition: service_healthy
networks:
- diadem-network
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://localhost:3900').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"
]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
diadem-db:
image: mariadb:11.4
container_name: diadem-db
restart: unless-stopped
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD:-changeme_root}
MARIADB_DATABASE: ${MARIADB_DATABASE:-diadem}
MARIADB_USER: ${MARIADB_USER:-diadem}
MARIADB_PASSWORD: ${MARIADB_PASSWORD:-changeme}
volumes:
- diadem-db-data:/var/lib/mysql
networks:
- diadem-network
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
volumes:
diadem-db-data:
name: diadem-db-data
diadem-logs:
name: diadem-logs
networks:
diadem-network:
name: diadem-network
driver: bridge
driver_opts:
# mariadb gets sad if the docker network mtu is larger than the host's
com.docker.network.driver.mtu: ${DOCKER_MTU:-1500}