Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

针对Docker部署的文档调整 #80

Open
popjdh opened this issue Jul 23, 2024 · 1 comment
Open

针对Docker部署的文档调整 #80

popjdh opened this issue Jul 23, 2024 · 1 comment

Comments

@popjdh
Copy link

popjdh commented Jul 23, 2024

Docker部署经常存在如下两大问题:

  • 服务器启动无应答
  • 饥荒服务启动缓慢

服务器启动无应答

docker部署时, 需要将相关端口开放. 至少应当开放面板端口8082/TCP, 地上端口10998/UDP, 地下端口10999/UDP.

而现有部署文档中只提及了端口8082/TCP.

饥荒服务启动缓慢

Docker现在默认的nofile已经达到1073741816. 类似的例子可以参考SOF.

这会导致GNU Screen运行十分缓慢, 进而影响对饥荒服务的启动与操纵.

解决方案

docker:

docker run -d --name dst -p 8082:8082 -p 10998:10998/udp -p 10999:10999/udp --ulimit nofile=65536:65536 hujinbo23/dst-admin-go:1.3.0

docker-compose:

version: "3"

services:
  dst:
    container_name: dst
    image: hujinbo23/dst-admin-go:1.3.0
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
    ports:
      - 8082:8082
      - 10998:10998/udp
      - 10999:10999/udp
    restart: unless-stopped
@carrot-hu23 carrot-hu23 pinned this issue Sep 18, 2024
@carrot-hu23
Copy link
Owner

docker-compose.yml 参考

version: '3'
services:
  dst-admin-go:
    image: hujinbo23/dst-admin-go:1.3.0
    port:
      - "8084:8082"
      - "10999:10999"
      - "10998:10998"
    volumes:
      - ${PWD}/dstsave:/root/.klei/DoNotStarveTogether
      - ${PWD}/dstsave/back:/app/backup
      - ${PWD}/steamcmd:/app/steamcmd
      - ${PWD}/dst-dedicated-server:/app/dst-dedicated-server
      - ${PWD}/dstsave/dst-db:/app/dst-db
      - ${PWD}/dstsave/password.txt:/app/password.txt
      - ${PWD}/dstsace/first:/app/first

挂载含义参考 https://hub.docker.com/repository/docker/hujinbo23/dst-admin-go/general

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants