2024-06-02 21:49:40 +03:00
|
|
|
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}
|
|
|
|
|
|
|
|
TEST_SERVER: ${TEST_SERVER}
|
|
|
|
|
|
|
|
DB_ADDR: ${DB_ADDR}
|
|
|
|
DB_PORT: ${DB_PORT}
|
|
|
|
|
|
|
|
PUBLIC_IP: ${PUBLIC_IP}
|
|
|
|
GAME_MAX_LEVEL: ${GAME_MAX_LEVEL}
|
|
|
|
GAME_MALL_URL: ${GAME_MALL_URL}
|
|
|
|
|
2023-12-09 23:34:28 +02:00
|
|
|
services:
|
|
|
|
# MySQL Database
|
|
|
|
mysql:
|
|
|
|
image: mysql:5.5
|
2024-06-02 21:49:40 +03:00
|
|
|
restart: on-failure
|
2023-12-09 23:34:28 +02:00
|
|
|
environment:
|
|
|
|
# Password for root access
|
|
|
|
MYSQL_ROOT_PASSWORD: 'metin2'
|
|
|
|
ports:
|
|
|
|
- '3306:3306'
|
|
|
|
expose:
|
|
|
|
- 3306
|
|
|
|
volumes:
|
|
|
|
- ./storage/database/:/var/lib/mysql/
|
2024-06-02 21:49:40 +03:00
|
|
|
healthcheck:
|
|
|
|
#test: ["CMD", "mysql", "-u", "${MYSQL_USER}", "--password", "${MYSQL_PASSWORD}", "-e", "USE ${MYSQL_DB_ACCOUNT};"]
|
|
|
|
test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p$$MYSQL_ROOT_PASSWORD' ]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
2023-12-09 23:34:28 +02:00
|
|
|
|
|
|
|
# DBCache Server
|
|
|
|
db:
|
2024-06-02 21:49:40 +03:00
|
|
|
image: ${GAME_IMAGE}
|
|
|
|
restart: on-failure
|
|
|
|
environment: *common-environment
|
2023-12-09 23:34:28 +02:00
|
|
|
expose:
|
2024-06-02 21:49:40 +03:00
|
|
|
- ${DB_PORT}
|
2023-12-09 23:34:28 +02:00
|
|
|
command: db
|
|
|
|
volumes:
|
|
|
|
- ./storage/log/db/:/app/log/
|
2024-06-02 21:49:40 +03:00
|
|
|
depends_on:
|
|
|
|
mysql:
|
|
|
|
condition: service_healthy
|
2023-12-09 23:34:28 +02:00
|
|
|
|
|
|
|
# Auth server
|
|
|
|
auth:
|
2024-06-02 21:49:40 +03:00
|
|
|
image: ${GAME_IMAGE}
|
|
|
|
restart: on-failure
|
|
|
|
environment:
|
|
|
|
<<: *common-environment
|
|
|
|
MYSQL_DB_PLAYER: ${MYSQL_DB_ACCOUNT}
|
|
|
|
GAME_HOSTNAME: auth
|
|
|
|
GAME_CHANNEL: 1
|
|
|
|
GAME_AUTH_SERVER: master
|
|
|
|
GAME_PORT: 11000
|
|
|
|
GAME_P2P_PORT: 12000
|
2023-12-09 23:34:28 +02:00
|
|
|
expose:
|
|
|
|
- 11000
|
|
|
|
- 12000
|
|
|
|
ports:
|
|
|
|
- '11000:11000'
|
|
|
|
command: game
|
|
|
|
volumes:
|
|
|
|
- ./storage/log/auth/:/app/log/
|
2024-06-02 21:49:40 +03:00
|
|
|
depends_on:
|
|
|
|
mysql:
|
|
|
|
condition: service_healthy
|
2023-12-09 23:34:28 +02:00
|
|
|
|
|
|
|
# Game server (CH1)
|
|
|
|
ch1_first:
|
2024-06-02 21:49:40 +03:00
|
|
|
image: ${GAME_IMAGE}
|
|
|
|
restart: on-failure
|
|
|
|
environment:
|
|
|
|
<<: *common-environment
|
|
|
|
GAME_HOSTNAME: ch1_first
|
|
|
|
GAME_CHANNEL: 1
|
|
|
|
GAME_MARK_SERVER: 1
|
|
|
|
GAME_PORT: 13000
|
|
|
|
GAME_P2P_PORT: 14000
|
|
|
|
GAME_MAP_ALLOW: 1 4 5 6 3 23 43 112 107 67 68 72 208 302 304
|
2023-12-09 23:34:28 +02:00
|
|
|
expose:
|
|
|
|
- 13000
|
|
|
|
- 14000
|
|
|
|
ports:
|
|
|
|
- '13000:13000'
|
|
|
|
command: game
|
|
|
|
volumes:
|
|
|
|
- ./storage/log/ch1/first/:/app/log/
|
|
|
|
- ./storage/mark/:/app/mark/
|
2024-06-02 21:49:40 +03:00
|
|
|
depends_on:
|
|
|
|
mysql:
|
|
|
|
condition: service_healthy
|
2023-12-09 23:34:28 +02:00
|
|
|
|
|
|
|
ch1_game1:
|
2024-06-02 21:49:40 +03:00
|
|
|
image: ${GAME_IMAGE}
|
|
|
|
restart: on-failure
|
|
|
|
environment:
|
|
|
|
<<: *common-environment
|
|
|
|
GAME_HOSTNAME: ch1_game1
|
|
|
|
GAME_CHANNEL: 1
|
|
|
|
GAME_MARK_SERVER: 0
|
|
|
|
GAME_PORT: 13001
|
|
|
|
GAME_P2P_PORT: 14001
|
|
|
|
GAME_MAP_ALLOW: 21 24 25 26 108 61 63 69 70 73 216 217 303
|
2023-12-09 23:34:28 +02:00
|
|
|
expose:
|
|
|
|
- 13001
|
|
|
|
- 14001
|
|
|
|
ports:
|
|
|
|
- '13001:13001'
|
|
|
|
command: game
|
|
|
|
volumes:
|
|
|
|
- ./storage/log/ch1/game1/:/app/log/
|
2024-06-02 21:49:40 +03:00
|
|
|
depends_on:
|
|
|
|
mysql:
|
|
|
|
condition: service_healthy
|
2023-12-09 23:34:28 +02:00
|
|
|
|
|
|
|
ch1_game2:
|
2024-06-02 21:49:40 +03:00
|
|
|
image: ${GAME_IMAGE}
|
|
|
|
restart: on-failure
|
|
|
|
environment:
|
|
|
|
<<: *common-environment
|
|
|
|
GAME_HOSTNAME: ch1_game2
|
|
|
|
GAME_CHANNEL: 1
|
|
|
|
GAME_MARK_SERVER: 0
|
|
|
|
GAME_PORT: 13002
|
|
|
|
GAME_P2P_PORT: 14002
|
|
|
|
GAME_MAP_ALLOW: 41 44 45 46 109 62 64 65 66 71 104 301 351
|
2023-12-09 23:34:28 +02:00
|
|
|
expose:
|
|
|
|
- 13002
|
|
|
|
- 14002
|
|
|
|
ports:
|
|
|
|
- '13002:13002'
|
|
|
|
command: game
|
|
|
|
volumes:
|
|
|
|
- ./storage/log/ch1/game2/:/app/log/
|
2024-06-02 21:49:40 +03:00
|
|
|
depends_on:
|
|
|
|
mysql:
|
|
|
|
condition: service_healthy
|
2023-12-09 23:34:28 +02:00
|
|
|
|
|
|
|
# Game server (game99)
|
|
|
|
game99:
|
2024-06-02 21:49:40 +03:00
|
|
|
image: ${GAME_IMAGE}
|
|
|
|
restart: on-failure
|
|
|
|
environment:
|
|
|
|
<<: *common-environment
|
|
|
|
GAME_HOSTNAME: game99
|
|
|
|
GAME_CHANNEL: 99
|
|
|
|
GAME_MARK_SERVER: 0
|
|
|
|
GAME_PORT: 13099
|
|
|
|
GAME_P2P_PORT: 14099
|
|
|
|
GAME_MAP_ALLOW: 113 81 100 101 103 105 110 111 114 118 119 120 121 122 123 124 125 126 127 128 181 182 183 200
|
2023-12-09 23:34:28 +02:00
|
|
|
expose:
|
|
|
|
- 13099
|
|
|
|
- 14099
|
|
|
|
ports:
|
|
|
|
- '13099:13099'
|
|
|
|
command: game
|
|
|
|
volumes:
|
|
|
|
- ./storage/log/game99/:/app/log/
|
2024-06-02 21:49:40 +03:00
|
|
|
depends_on:
|
|
|
|
mysql:
|
|
|
|
condition: service_healthy
|