forked from XanderYe/dnf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
90 lines (88 loc) · 2.62 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: "2.3"
networks:
dnf:
ipam:
config:
- subnet: 172.20.0.0/16
services:
dnfmysql:
image: victorbo/dnf-mysql:5.6
ports:
- 3000:3306
environment:
- TZ=Asia/Shanghai
# game账户ip白名单
- ALLOW_IP=172.20.0.%
# game账户密码
- GAME_PASSWORD=uu5!^%jg
- MYSQL_ROOT_PASSWORD=88888888
networks:
- dnf
restart: unless-stopped
volumes:
- ./dnfmysql/mysql:/var/lib/mysql
container_name: dnfmysql
dnfgame:
image: victorbo/dnf-game:centos7
depends_on:
- dnfmysql
environment:
- TZ=Asia/Shanghai
# 自动获取mysql容器的ip
- AUTO_MYSQL_IP=true
# mysql容器名称(主机名)
- MYSQL_NAME=dnfmysql
# mysql的IP地址(使用时需要关闭AUTO_MYSQL_IP)
- MYSQL_IP=192.168.1.2
# mysql的IP端口(使用时需要关闭AUTO_MYSQL_IP)
- MYSQL_PORT=3306
# game账户密码
- GAME_PASSWORD=uu5!^%jg
# 自动获取公网ip
- AUTO_PUBLIC_IP=false
# 这里填写你的IP地址
- PUBLIC_IP=127.0.0.1
# DP2插件
- DP2=true
shm_size: 12g
memswap_limit: -1
mem_limit: 1g
# windows下生效
cpu_count: 1
# 占用1个cpu
cpus: 1.0
networks:
- dnf
restart: unless-stopped
ports:
- 20303:20303/tcp # df_dbmw_r
- 20303:20303/udp # df_dbmw_r
- 20403:20403/tcp # df_dbmw_r
- 20403:20403/udp # df_dbmw_r
- 40403:40403/tcp # df_manager_r
- 40403:40403/udp # df_manager_r
- 7000:7000/tcp # df_bridge_r
- 7000:7000/udp # df_bridge_r
- 7001:7001/tcp # df_channel_r
- 7001:7001/udp # df_channel_r
- 7200:7200/tcp # df_relay_r
- 7200:7200/udp # df_relay_r
- 10011:10011/tcp # df_game_r
- 31100:31100/tcp # df_community
- 30303:30303/tcp # df_monitor_r
- 30303:30303/udp # df_monitor_r
- 30403:30403/tcp # df_guild_r
- 30403:30403/udp # df_guild_r
- 10052:10052/tcp # df_game_r
- 20011:20011/tcp # df_game_r
- 20203:20203/tcp # df_dbmw_r
- 20203:20203/udp # df_dbmw_r
- 30703:30703/udp # df_coserver_r
- 11011:11011/udp # df_game_r
- 2311-2313:2311-2313/udp # df_stun_r
- 30503:30503/udp # df_statics_r
- 11052:11052/udp # df_game_r
volumes:
- ./dnfgame/game:/game
- ./dnfgame/log:/home/neople/game/log
container_name: dnfgame