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