1 Commits

Author SHA1 Message Date
893d744c5b change: Use MariaDB 2025-06-17 17:28:15 +01:00

View File

@ -1,13 +1,9 @@
x-environment: x-environment: &common-environment
&common-environment MARIADB_HOST: ${MARIADB_HOST}
MYSQL_HOST: ${MYSQL_HOST} MARIADB_USER: ${MARIADB_USER}
MYSQL_USER: ${MYSQL_USER} MARIADB_PASSWORD: ${MARIADB_PASSWORD}
MYSQL_PASSWORD: ${MYSQL_PASSWORD} MARIADB_PORT: ${MARIADB_PORT}
MYSQL_PORT: ${MYSQL_PORT} MARIADB_DB: ${MARIADB_DB}
MYSQL_DB_ACCOUNT: ${MYSQL_DB_ACCOUNT}
MYSQL_DB_PLAYER: ${MYSQL_DB_PLAYER}
MYSQL_DB_COMMON: ${MYSQL_DB_COMMON}
MYSQL_DB_LOG: ${MYSQL_DB_LOG}
TEST_SERVER: ${TEST_SERVER} TEST_SERVER: ${TEST_SERVER}
@ -19,24 +15,25 @@ x-environment:
WEB_APP_URL: ${WEB_APP_URL} WEB_APP_URL: ${WEB_APP_URL}
WEB_APP_KEY: ${WEB_APP_KEY} WEB_APP_KEY: ${WEB_APP_KEY}
name: Metin2
services: services:
# MySQL Database # MySQL Database
mysql: mysql:
# The biarms/mysql Docker image supports ARM machines; you may also use mysql:5.5 image: mariadb:lts
image: biarms/mysql:5.5
restart: always restart: always
environment: environment:
# Password for root access # Password for root access
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD} MARIADB_ROOT_PASSWORD: ${MARIADB_PASSWORD}
ports: ports:
- '${MYSQL_EXTERNAL_PORT}:${MYSQL_PORT}' - "${MARIADB_EXTERNAL_PORT}:${MARIADB_PORT}"
expose: expose:
- ${MYSQL_PORT} - ${MARIADB_PORT}
volumes: volumes:
- ./storage/database/:/var/lib/mysql/ - ./storage/database/:/var/lib/mysql/
- ./assets/db-init/:/docker-entrypoint-initdb.d/:ro - ./assets/db-init/:/docker-entrypoint-initdb.d/:ro
healthcheck: healthcheck:
test: mysqladmin ping -h localhost -u root -p$$MYSQL_ROOT_PASSWORD test: mysqladmin ping -h localhost -u root -p$$MARIADB_ROOT_PASSWORD
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
@ -53,10 +50,10 @@ services:
APP_URL: ${WEB_APP_URL} APP_URL: ${WEB_APP_URL}
# Database credentials # Database credentials
DB_HOST: ${MYSQL_HOST} DB_HOST: ${MARIADB_HOST}
DB_PORT: ${MYSQL_PORT} DB_PORT: ${MARIADB_PORT}
DB_USERNAME: ${MYSQL_USER} DB_USERNAME: ${MARIADB_USER}
DB_PASSWORD: ${MYSQL_PASSWORD} DB_PASSWORD: ${MARIADB_PASSWORD}
# E-mail config # E-mail config
MAIL_MAILER: ${WEB_MAIL_MAILER} MAIL_MAILER: ${WEB_MAIL_MAILER}
@ -68,7 +65,7 @@ services:
MAIL_FROM_ADDRESS: ${WEB_MAIL_FROM_ADDRESS} MAIL_FROM_ADDRESS: ${WEB_MAIL_FROM_ADDRESS}
MAIL_FROM_NAME: ${WEB_MAIL_FROM_NAME} MAIL_FROM_NAME: ${WEB_MAIL_FROM_NAME}
ports: ports:
- '${WEB_EXTERNAL_PORT}:80' - "${WEB_EXTERNAL_PORT}:80"
volumes: volumes:
- ./storage/web/:/app/storage/ - ./storage/web/:/app/storage/
depends_on: depends_on:
@ -93,8 +90,6 @@ services:
depends_on: depends_on:
mysql: mysql:
condition: service_healthy condition: service_healthy
web:
condition: service_healthy
# Auth server # Auth server
auth: auth:
@ -102,7 +97,7 @@ services:
restart: always restart: always
environment: environment:
<<: *common-environment <<: *common-environment
MYSQL_DB_PLAYER: ${MYSQL_DB_ACCOUNT} MARIADB_DB: ${MARIADB_DB}
GAME_HOSTNAME: auth GAME_HOSTNAME: auth
GAME_CHANNEL: 1 GAME_CHANNEL: 1
GAME_AUTH_SERVER: master GAME_AUTH_SERVER: master
@ -112,15 +107,13 @@ services:
- 11000 - 11000
- 12000 - 12000
ports: ports:
- '11000:11000' - "11000:11000"
command: game command: game
volumes: volumes:
- ./storage/log/auth/:/app/log/ - ./storage/log/auth/:/app/log/
depends_on: depends_on:
mysql: mysql:
condition: service_healthy condition: service_healthy
web:
condition: service_healthy
# Game server (CH1) # Game server (CH1)
ch1_first: ch1_first:
@ -138,7 +131,7 @@ services:
- 13000 - 13000
- 14000 - 14000
ports: ports:
- '13000:13000' - "13000:13000"
command: game command: game
volumes: volumes:
- ./storage/log/ch1/first/:/app/log/ - ./storage/log/ch1/first/:/app/log/
@ -146,8 +139,6 @@ services:
depends_on: depends_on:
mysql: mysql:
condition: service_healthy condition: service_healthy
web:
condition: service_healthy
ch1_game1: ch1_game1:
image: ${GAME_IMAGE} image: ${GAME_IMAGE}
@ -164,15 +155,13 @@ services:
- 13001 - 13001
- 14001 - 14001
ports: ports:
- '13001:13001' - "13001:13001"
command: game command: game
volumes: volumes:
- ./storage/log/ch1/game1/:/app/log/ - ./storage/log/ch1/game1/:/app/log/
depends_on: depends_on:
mysql: mysql:
condition: service_healthy condition: service_healthy
web:
condition: service_healthy
ch1_game2: ch1_game2:
image: ${GAME_IMAGE} image: ${GAME_IMAGE}
@ -189,15 +178,13 @@ services:
- 13002 - 13002
- 14002 - 14002
ports: ports:
- '13002:13002' - "13002:13002"
command: game command: game
volumes: volumes:
- ./storage/log/ch1/game2/:/app/log/ - ./storage/log/ch1/game2/:/app/log/
depends_on: depends_on:
mysql: mysql:
condition: service_healthy condition: service_healthy
web:
condition: service_healthy
# Game server (game99) # Game server (game99)
game99: game99:
@ -215,12 +202,10 @@ services:
- 13099 - 13099
- 14099 - 14099
ports: ports:
- '13099:13099' - "13099:13099"
command: game command: game
volumes: volumes:
- ./storage/log/game99/:/app/log/ - ./storage/log/game99/:/app/log/
depends_on: depends_on:
mysql: mysql:
condition: service_healthy condition: service_healthy
web:
condition: service_healthy