Skip to content

Commit

Permalink
release: 2.0.2
Browse files Browse the repository at this point in the history
1.添加一些常用工具
2.更新部署文档
3.PRELOAD_LD默认开启
update doc
  • Loading branch information
1995chen committed Jan 21, 2022
1 parent fa02035 commit e8120fd
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
env:
- name: TZ
value: "Asia/Shanghai"
image: 1995chen/dnf:centos7-1.0.1
image: 1995chen/dnf:centos7-2.0.2
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["/home/template/init/init.sh"]
Expand All @@ -80,7 +80,7 @@ spec:
containers:
- name: dnf
imagePullPolicy: IfNotPresent
image: 1995chen/dnf:centos7-1.0.1
image: 1995chen/dnf:centos7-2.0.2
ports:
- name: mysql
containerPort: 3306
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ https://www.cnblogs.com/EasonJim/p/7777904.html
以下命令二选一

```shell
docker pull 1995chen/dnf:centos6-1.0.1
docker pull 1995chen/dnf:centos6-2.0.2
如何您需要使用centos7作为基础镜像的特殊需求,可以使用:
docker pull 1995chen/dnf:centos7-1.0.1
docker pull 1995chen/dnf:centos7-2.0.2
所有镜像版本列表请参考[记得点赞三连,帮助更多的人了解该镜像]:
https://hub.docker.com/repository/docker/1995chen/dnf
```
Expand All @@ -99,14 +99,14 @@ mkdir -p /data
# 初始化数据库以及基础数据文件(该过程耗时较长,可能会超过10分钟请耐心等待)
# 该初始化容器是个一次性任务,跑完会在data, mysql目录下创建初始化文件,程序运行完成后自动退出,不会留下任务容器残留
# 如果要重新初始化数据,则需要删除mysql, log, data目录重新运行该初始化命令,注意:如果目录没有清空是不会执行任何操作的
docker run --rm -v /data/log:/home/neople/game/log -v /data/mysql:/var/lib/mysql -v /data/data:/data 1995chen/dnf:centos6-1.0.1 /bin/bash /home/template/init/init.sh
docker run --rm -v /data/log:/home/neople/game/log -v /data/mysql:/var/lib/mysql -v /data/data:/data 1995chen/dnf:centos6-2.0.2 /bin/bash /home/template/init/init.sh

# 启动服务
# PUBLIC_IP为公网IP地址,如果在局域网部署则用局域网IP地址,按实际需要替换
# GM_ACCOUNT为登录器用户名,建议替换
# GM_PASSWORD为登录器密码,建议替换
# DNF_DB_ROOT_PASSWORD为mysql root密码,容器启动是root密码会跟随该环境变量的变化自动更新
docker run -d -e PUBLIC_IP=x.x.x.x -e DNF_DB_ROOT_PASSWORD=88888888 -e GM_ACCOUNT=gm_user -e GM_PASSWORD=gm_pass -v /data/log:/home/neople/game/log -v /data/mysql:/var/lib/mysql -v /data/data:/data -p 3000:3306/tcp -p 7600:7600/tcp -p 881:881/tcp -p 20303:20303/tcp -p 20303:20303/udp -p 20403:20403/tcp -p 20403:20403/udp -p 40403:40403/tcp -p 40403:40403/udp -p 7000:7000/tcp -p 7000:7000/udp -p 7001:7001/tcp -p 7001:7001/udp -p 7200:7200/tcp -p 7200:7200/udp -p 10011:10011/tcp -p 31100:31100/tcp -p 30303:30303/tcp -p 30303:30303/udp -p 30403:30403/tcp -p 30403:30403/udp -p 10052:10052/tcp -p 20011:20011/tcp -p 20203:20203/tcp -p 20203:20203/udp -p 30703:30703/udp -p 11011:11011/udp -p 2311-2313:2311-2313/udp -p 30503:30503/udp -p 11052:11052/udp --cpus=1 --memory=1g --memory-swap=-1 --shm-size=8g --name=dnf 1995chen/dnf:centos6-1.0.1
docker run -d -e PUBLIC_IP=x.x.x.x -e DNF_DB_ROOT_PASSWORD=88888888 -e GM_ACCOUNT=gm_user -e GM_PASSWORD=gm_pass -v /data/log:/home/neople/game/log -v /data/mysql:/var/lib/mysql -v /data/data:/data -p 3000:3306/tcp -p 7600:7600/tcp -p 881:881/tcp -p 20303:20303/tcp -p 20303:20303/udp -p 20403:20403/tcp -p 20403:20403/udp -p 40403:40403/tcp -p 40403:40403/udp -p 7000:7000/tcp -p 7000:7000/udp -p 7001:7001/tcp -p 7001:7001/udp -p 7200:7200/tcp -p 7200:7200/udp -p 10011:10011/tcp -p 31100:31100/tcp -p 30303:30303/tcp -p 30303:30303/udp -p 30403:30403/tcp -p 30403:30403/udp -p 10052:10052/tcp -p 20011:20011/tcp -p 20203:20203/tcp -p 20203:20203/udp -p 30703:30703/udp -p 11011:11011/udp -p 2311-2313:2311-2313/udp -p 30503:30503/udp -p 11052:11052/udp --cpus=1 --memory=1g --memory-swap=-1 --shm-size=8g --name=dnf 1995chen/dnf:centos6-2.0.2
```

## 如何确认已经成功启动
Expand Down Expand Up @@ -178,7 +178,7 @@ docker rm dnf
```
然后用最新的环境变量设置启动服务即可
```shell
# 自动获取公网地址
# 自动获取公网地址[默认为false]
AUTO_PUBLIC_IP
# 公网或局域网IP地址
PUBLIC_IP
Expand All @@ -194,7 +194,7 @@ GM_LANDER_VERSION
DNF_DB_ROOT_PASSWORD
# DNF数据库game密码(必须8位)
DNF_DB_GAME_PASSWORD
# 采用LD_PRELOAD优化CPU使用[模式为false]
# 采用LD_PRELOAD优化CPU使用[默认为true]
PRELOAD_LD
```
Windows高版本用户无法进入频道,需要添加hosts
Expand Down
2 changes: 1 addition & 1 deletion build/Centos6-DNF/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MAINTAINER 1995chen

# 定义默认环境变量
ENV AUTO_PUBLIC_IP=false
ENV PRELOAD_LD=false
ENV PRELOAD_LD=true
ENV PUBLIC_IP=127.0.0.1
ENV GM_ACCOUNT=gm_user
ENV GM_PASSWORD=gm_pass
Expand Down
2 changes: 1 addition & 1 deletion build/Centos7-DNF/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MAINTAINER 1995chen

# 定义默认环境变量
ENV AUTO_PUBLIC_IP=false
ENV PRELOAD_LD=false
ENV PRELOAD_LD=true
ENV PUBLIC_IP=127.0.0.1
ENV GM_ACCOUNT=gm_user
ENV GM_PASSWORD=gm_pass
Expand Down
4 changes: 2 additions & 2 deletions deploy/dnf/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ networks:

services:
init-dnf:
image: 1995chen/dnf:centos6-1.0.1
image: 1995chen/dnf:centos6-2.0.2
environment:
- TZ=Asia/Shanghai
command: ['/bin/bash', '/home/template/init/init.sh']
Expand All @@ -19,7 +19,7 @@ services:
- ./data:/data
- ./mysql:/var/lib/mysql
dnf:
image: 1995chen/dnf:centos6-1.0.1
image: 1995chen/dnf:centos6-2.0.2
depends_on:
- init-dnf
environment:
Expand Down
Binary file added other/登录器/DOF补丁大合集V7.6.7z
Binary file not shown.
Binary file not shown.

0 comments on commit e8120fd

Please sign in to comment.