From 125be657829faf6a3093168df570752aba058b2e Mon Sep 17 00:00:00 2001 From: root Date: Sat, 9 Dec 2023 23:34:28 +0200 Subject: [PATCH] Add initial test version --- .gitignore | 2 + config/auth.txt | 18 +++++++++ config/ch1/first.txt | 27 +++++++++++++ config/ch1/game1.txt | 26 ++++++++++++ config/ch1/game2.txt | 26 ++++++++++++ config/db.txt | 19 +++++++++ config/game99.txt | 26 ++++++++++++ docker-compose.yml | 95 ++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 239 insertions(+) create mode 100644 .gitignore create mode 100644 config/auth.txt create mode 100644 config/ch1/first.txt create mode 100644 config/ch1/game1.txt create mode 100644 config/ch1/game2.txt create mode 100644 config/db.txt create mode 100644 config/game99.txt create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c204181 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Storage directory +storage/ diff --git a/config/auth.txt b/config/auth.txt new file mode 100644 index 0000000..fd81b7b --- /dev/null +++ b/config/auth.txt @@ -0,0 +1,18 @@ +CHANNEL: 1 +HOSTNAME: auth +PUBLIC_IP: 127.0.0.1 +PORT: 11000 +P2P_PORT: 12000 +DB_ADDR: db +DB_PORT: 15000 +PLAYER_SQL: mysql root metin2 account +COMMON_SQL: mysql root metin2 common +LOG_SQL: mysql root metin2 log +TABLE_POSTFIX: +PASSES_PER_SEC: 25 +PING_EVENT_SECOND_CYCLE: 180 +ADMINPAGE_PASSWORD: metin2adminpass +ADMINPAGE_IP: 127.0.0.1 +AUTH_SERVER: master +TRAFFIC_PROFILE: +TEST_SERVER: 0 diff --git a/config/ch1/first.txt b/config/ch1/first.txt new file mode 100644 index 0000000..b9f24f2 --- /dev/null +++ b/config/ch1/first.txt @@ -0,0 +1,27 @@ +CHANNEL: 1 +HOSTNAME: ch1_first +PUBLIC_IP: 127.0.0.1 +PORT: 13000 +P2P_PORT: 14000 +DB_ADDR: db +DB_PORT: 15000 +MAP_ALLOW: 1 4 5 6 3 23 43 112 107 67 68 72 208 302 304 +PLAYER_SQL: mysql root metin2 player +COMMON_SQL: mysql root metin2 common +LOG_SQL: mysql root metin2 log +TABLE_POSTFIX: +PASSES_PER_SEC: 25 +SAVE_EVENT_SECOND_CYCLE: 180 +PING_EVENT_SECOND_CYCLE: 180 +VIEW_RANGE: 8000 +CHECK_MULTIHACK: 0 +ADMINPAGE_PASSWORD: metin2adminpass +ADMINPAGE_IP: 127.0.0.1 +SPEEDHACK_LIMIT_COUNT: 300 +SPEEDHACK_LIMIT_BONUS: 80 +PK_PROTECT_LEVEL: 15 +MALL_URL: google.com +TRAFFIC_PROFILE: +TEST_SERVER: 0 +MAX_LEVEL: 105 +MARK_SERVER: 1 \ No newline at end of file diff --git a/config/ch1/game1.txt b/config/ch1/game1.txt new file mode 100644 index 0000000..68a7411 --- /dev/null +++ b/config/ch1/game1.txt @@ -0,0 +1,26 @@ +CHANNEL: 1 +HOSTNAME: ch1_game1 +PUBLIC_IP: 127.0.0.1 +PORT: 13001 +P2P_PORT: 14001 +DB_ADDR: db +DB_PORT: 15000 +MAP_ALLOW: 21 24 25 26 108 61 63 69 70 73 216 217 303 +PLAYER_SQL: mysql root metin2 player +COMMON_SQL: mysql root metin2 common +LOG_SQL: mysql root metin2 log +TABLE_POSTFIX: +PASSES_PER_SEC: 25 +SAVE_EVENT_SECOND_CYCLE: 180 +PING_EVENT_SECOND_CYCLE: 180 +VIEW_RANGE: 8000 +CHECK_MULTIHACK: 0 +ADMINPAGE_PASSWORD: metin2adminpass +ADMINPAGE_IP: 127.0.0.1 +SPEEDHACK_LIMIT_COUNT: 300 +SPEEDHACK_LIMIT_BONUS: 80 +PK_PROTECT_LEVEL: 15 +MALL_URL: google.com +TRAFFIC_PROFILE: +TEST_SERVER: 0 +MAX_LEVEL: 105 \ No newline at end of file diff --git a/config/ch1/game2.txt b/config/ch1/game2.txt new file mode 100644 index 0000000..8af78d0 --- /dev/null +++ b/config/ch1/game2.txt @@ -0,0 +1,26 @@ +CHANNEL: 1 +HOSTNAME: ch1_game2 +PUBLIC_IP: 127.0.0.1 +PORT: 13002 +P2P_PORT: 14002 +DB_ADDR: db +DB_PORT: 15000 +MAP_ALLOW: 41 44 45 46 109 62 64 65 66 71 104 301 351 +PLAYER_SQL: mysql root metin2 player +COMMON_SQL: mysql root metin2 common +LOG_SQL: mysql root metin2 log +TABLE_POSTFIX: +PASSES_PER_SEC: 25 +SAVE_EVENT_SECOND_CYCLE: 180 +PING_EVENT_SECOND_CYCLE: 180 +VIEW_RANGE: 8000 +CHECK_MULTIHACK: 0 +ADMINPAGE_PASSWORD: metin2adminpass +ADMINPAGE_IP: 127.0.0.1 +SPEEDHACK_LIMIT_COUNT: 300 +SPEEDHACK_LIMIT_BONUS: 80 +PK_PROTECT_LEVEL: 15 +MALL_URL: google.com +TRAFFIC_PROFILE: +TEST_SERVER: 0 +MAX_LEVEL: 105 \ No newline at end of file diff --git a/config/db.txt b/config/db.txt new file mode 100644 index 0000000..3f1f00c --- /dev/null +++ b/config/db.txt @@ -0,0 +1,19 @@ +WELCOME_MSG = "DB Server has been started" + +SQL_ACCOUNT = "mysql account root metin2 0" +SQL_PLAYER = "mysql player root metin2 0" +SQL_COMMON = "mysql common root metin2 0" +SQL_HOTBACKUP = "mysql hotbackup root metin2 0" + +TABLE_POSTFIX = "" + +BIND_PORT = 15000 +DB_SLEEP_MSEC = 10 +CLIENT_HEART_FPS = 10 +HASH_PLAYER_LIFE_SEC = 600 +BACKUP_LIMIT_SEC = 3600 +PLAYER_ID_START = 100 +PLAYER_DELETE_LEVEL_LIMIT = 70 + +ITEM_ID_RANGE = 10000001 20000000 +TEST_SERVER = 0 diff --git a/config/game99.txt b/config/game99.txt new file mode 100644 index 0000000..52bb5d5 --- /dev/null +++ b/config/game99.txt @@ -0,0 +1,26 @@ +CHANNEL: 99 +HOSTNAME: game99 +PUBLIC_IP: 127.0.0.1 +PORT: 13099 +P2P_PORT: 14099 +DB_ADDR: db +DB_PORT: 15000 +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 +PLAYER_SQL: mysql root metin2 player +COMMON_SQL: mysql root metin2 common +LOG_SQL: mysql root metin2 log +TABLE_POSTFIX: +PASSES_PER_SEC: 25 +SAVE_EVENT_SECOND_CYCLE: 180 +PING_EVENT_SECOND_CYCLE: 180 +VIEW_RANGE: 8000 +CHECK_MULTIHACK: 0 +ADMINPAGE_PASSWORD: metin2adminpass +ADMINPAGE_IP: 127.0.0.1 +SPEEDHACK_LIMIT_COUNT: 300 +SPEEDHACK_LIMIT_BONUS: 80 +PK_PROTECT_LEVEL: 15 +MALL_URL: google.com +TRAFFIC_PROFILE: +TEST_SERVER: 0 +MAX_LEVEL: 105 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5b38161 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,95 @@ +version: '3.3' +services: + # MySQL Database + mysql: + image: mysql:5.5 + restart: always + environment: + # Password for root access + MYSQL_ROOT_PASSWORD: 'metin2' + ports: + - '3306:3306' + expose: + - 3306 + volumes: + - ./storage/database/:/var/lib/mysql/ + + # DBCache Server + db: + image: metin2/server:test + restart: always + expose: + - 15000 + command: db + volumes: + - ./config/db.txt:/app/conf.txt + - ./storage/log/db/:/app/log/ + + # Auth server + auth: + image: metin2/server:test + restart: always + expose: + - 11000 + - 12000 + ports: + - '11000:11000' + command: game + volumes: + - ./config/auth.txt:/app/CONFIG + - ./storage/log/auth/:/app/log/ + + # Game server (CH1) + ch1_first: + image: metin2/server:test + restart: always + expose: + - 13000 + - 14000 + ports: + - '13000:13000' + command: game + volumes: + - ./config/ch1/first.txt:/app/CONFIG + - ./storage/log/ch1/first/:/app/log/ + - ./storage/mark/:/app/mark/ + + ch1_game1: + image: metin2/server:test + restart: always + expose: + - 13001 + - 14001 + ports: + - '13001:13001' + command: game + volumes: + - ./config/ch1/game1.txt:/app/CONFIG + - ./storage/log/ch1/game1/:/app/log/ + + ch1_game2: + image: metin2/server:test + restart: always + expose: + - 13002 + - 14002 + ports: + - '13002:13002' + command: game + volumes: + - ./config/ch1/game2.txt:/app/CONFIG + - ./storage/log/ch1/game2/:/app/log/ + + # Game server (game99) + game99: + image: metin2/server:test + restart: always + expose: + - 13099 + - 14099 + ports: + - '13099:13099' + command: game + volumes: + - ./config/game99.txt:/app/CONFIG + - ./storage/log/game99/:/app/log/