Modify docker compose syntax to support using environment variables

This commit is contained in:
Hazel 2024-01-25 00:17:16 -05:00
parent 41481c18cd
commit cec8b62361

View File

@ -1,4 +1,4 @@
version: '3'
version: "3"
services:
maplestory:
build: .
@ -18,15 +18,16 @@ services:
- ./scripts:/opt/server/scripts
- ./wz:/opt/server/wz
environment:
DB_HOST: "db" ## Remember if this is present it will OVERRIDE the host in the config.yaml, if you put here anything other than db, you'll need to change the config.yaml jdbc string to port 3307, and not port 3306
DB_HOST: "db"
# Remember if this is present it will OVERRIDE the host in the config.yaml, if you put here anything other than db, you'll need to change the config.yaml jdbc string to port 3307, and not port 3306
db:
image: mysql:8.0.23
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "true"
MYSQL_DATABASE: "cosmic"
MYSQL_USER: "cosmic_server"
MYSQL_PASSWORD: "snailshell"
- MYSQL_RANDOM_ROOT_PASSWORD=true
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
ports:
- "3307:3306"
volumes: