Files
sweetgum-server/docker-compose.yml
2023-08-13 17:33:25 +03:00

38 lines
1.2 KiB
YAML

version: '3'
services:
maplestory:
build: .
depends_on:
- db
ports:
# Login server
- "8484:8484"
# Channels.
# Format: WWCC, where WW is 75 plus the world number and CC is 75 plus the channel number (both zero indexed).
# In this case, world 1 channels 1-3.
- "7575-7577:7575-7577"
volumes:
# Config changes can be reloaded without rebuilding the image.
# Still requires a redeployment as they're sourced on startup.
- ./config.yaml:/opt/server/config.yaml
- ./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, this one is optional.
db:
image: mysql:8.0.23
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "true"
MYSQL_DATABASE: "cosmic"
MYSQL_USER: "cosmic_server"
MYSQL_PASSWORD: "snailshell"
cap_add:
- SYS_NICE
ports:
- "3307:3307"
volumes:
- ./database/docker-db-data:/var/lib/mysql
- ./database/sql:/docker-entrypoint-initdb.d
- ./mysql.cnf:/etc/mysql/conf.d/mysql.cnf ## conf file for mysql internal container, relevant only if mysql host is not 'db' as mentioned above