mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 09:48:20 +00:00
35c463656d
I initially used the bind mount because it's arguably easier to back up and move around than a volume, but turns out with https://github.com/DarkflameUniverse/NexusDashboard/issues/92 it's nothing we can recommend for Docker Desktop on WSL, which unfortunately is the primary setup newcomers will try this with. So changing the default to be a volume should address that (presumably by hosting the volume within the WSL Docker VM, as opposed to the host NTFS filesystem)
85 lines
2.6 KiB
YAML
85 lines
2.6 KiB
YAML
version: "3"
|
|
name: dlu
|
|
|
|
services:
|
|
darkflamedb:
|
|
networks:
|
|
- darkflame
|
|
image: mariadb:latest
|
|
volumes:
|
|
- ${DB_DATA_DIR:-db-data}:/var/lib/mysql
|
|
environment:
|
|
- MARIADB_RANDOM_ROOT_PASSWORD=1
|
|
- MARIADB_USER=${MARIADB_USER:-darkflame}
|
|
- MARIADB_PASSWORD=${MARIADB_PASSWORD:?error}
|
|
- MARIADB_DATABASE=${MARIADB_DATABASE:-darkflame}
|
|
healthcheck:
|
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
|
start_period: 10s
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
darkflameserver:
|
|
networks:
|
|
- darkflame
|
|
image: ghcr.io/darkflameuniverse/darkflameserver:latest
|
|
volumes:
|
|
- ${HOST_CONFIG_DIR:-./server/config}:/app/configs/
|
|
- ${CLIENT_PATH:-./client}:/app/luclient:ro
|
|
- ${HOST_RESSERVER_LOCATION:-./server/res}:/app/resServer/
|
|
- ${HOST_DUMP_FOLDER:-./server/dump}:/app/dump/
|
|
- ${HOST_LOGS_DIR:-./server/logs}:/app/logs/
|
|
environment:
|
|
- CLIENT_LOCATION=/app/luclient
|
|
- DLU_CONFIG_DIR=/app/configs
|
|
- DUMP_FOLDER=/app/dump
|
|
- MYSQL_HOST=darkflamedb
|
|
- MYSQL_DATABASE=${MARIADB_DATABASE:-darkflame}
|
|
- MYSQL_USERNAME=${MARIADB_USER:-darkflame}
|
|
- MYSQL_PASSWORD=${MARIADB_PASSWORD:?error}
|
|
- EXTERNAL_IP=${EXTERNAL_IP:-localhost}
|
|
- CLIENT_NET_VERSION=${CLIENT_NET_VERSION:-171022}
|
|
depends_on:
|
|
- darkflamedb
|
|
ports:
|
|
- "1001:1001/udp"
|
|
- "2005:2005/udp"
|
|
- "3000-3300:3000-3300/udp"
|
|
healthcheck:
|
|
test: ["CMD", "ls", "/app/resServer/CDServer.sqlite"]
|
|
|
|
darkflameweb:
|
|
networks:
|
|
- darkflame
|
|
image: ghcr.io/darkflameuniverse/nexusdashboard:latest
|
|
volumes:
|
|
- ${CLIENT_PATH:-./client}:/app/luclient:ro
|
|
- ${HOST_CACHE_LOCATION:-./web/cache}:/app/cache
|
|
- ${HOST_RESSERVER_LOCATION:-./server/res}:/app/cdclient:ro
|
|
- ${HOST_ND_LOGS_LOCATION:-./web/logs}:/logs
|
|
environment:
|
|
- APP_SECRET_KEY=${ACCOUNT_MANAGER_SECRET:?error}
|
|
- APP_DATABASE_URI=mysql+pymysql://${MARIADB_USER:-darkflame}:${MARIADB_PASSWORD:?error}@darkflamedb:3306/${MARIADB_DATABASE:-darkflame}
|
|
- CLIENT_LOCATION=/app/luclient/
|
|
- CACHE_LOCATION=/app/cache/
|
|
- CD_SQLITE_LOCATION=/app/cdclient/
|
|
- USER_ENABLE_REGISTER=1 # "0" is _not_ false, to disable, remove this line
|
|
depends_on:
|
|
- darkflamedb
|
|
- darkflameserver
|
|
ports:
|
|
- 8000:8000
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000"]
|
|
interval: 2m
|
|
timeout: 3s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
networks:
|
|
darkflame:
|
|
|
|
volumes:
|
|
db-data:
|