jammsen / docker-palworld-dedicated-server

Docker container to easily provision and manage Palworld Dedicated Server
https://hub.docker.com/r/jammsen/palworld-dedicated-server
MIT License
897 stars 151 forks source link

set default SERVER_SETTINGS_MODE=auto #262

Closed Radical-Egg closed 2 months ago

Radical-Egg commented 2 months ago

Hi,

After reading the discord guidelines I realized that it was more suitable to file something on GitHub (sorry about the noise in chat).

It is my understanding that the default SERVER_SETTINGS_MODE should be auto based on these docs.

Important: If you want to change the server settings via environment variables use the default value (auto) for the environment variable SERVER_SETTINGS_MODE, otherwise change it to manual and edit the config file directly

It seems that the current default is set to manual in the Dockerfile. When I attempted to run my dedicated server for the first time, I was having trouble figuring out how to change settings because I used my own default.env file and not the one inside of this repo.

# custom.default.env
egg蛋ada docker-palworld-dedicated-server on  develop [!?]
❯ cat custom.default.env
PUID=1000
PGID=1000
TZ=America/Los_Angeles
STEAMCMD_VALIDATE_FILES=true
BACKUP_ENABLED=true
ADMIN_PASSWORD=new_admin_pass123
SERVER_PASSWORD=new_server_pass123
COMMUNITY_SERVER=false
MULTITHREAD_ENABLED=true
SERVER_NAME="My dedicated server"
# docker-compose.yml
egg蛋ada docker-palworld-dedicated-server on  develop [!?]
❯ cat docker-compose.yml
version: '3.9'
services:
  palworld-dedicated-server:
    container_name: palworld-dedicated-server-test
    image: jammsen/palworld-dedicated-server:latest
    restart: unless-stopped
    ports:
      - target: 8211 # Gamerserver port inside of the container
        published: 8211 # Gamerserver port on your host
        protocol: udp
        mode: host
      - target: 8212 # Gameserver API port inside of the container
        published: 8212 # Gameserver API port on your host
        protocol: tcp
        mode: host
      - target: 25575 # RCON port inside of the container
        published: 25575 # RCON port on your host
        protocol: tcp
        mode: host
    env_file:
      - ./custom.default.env
    volumes:
      - ./game:/palworld

Unexpected:

palworld-dedicated-server-test  | >>> SERVER_SETTINGS_MODE is set to 'manual', NOT using environment variables to configure the server!

Changing SERVER_SETTINGS_MODE=auto in the Dockerfile has the behavior that I expected based on the docs.

palworld-dedicated-server-test  | >>> SERVER_SETTINGS_MODE is set to 'auto', using environment variables to configure the server

Thanks for the cool project!

jammsen commented 2 months ago

Hey @Radical-Egg i already answered you in Discord to this topic. This works as designed, this is not a bug or and error and i dont plan to change this. Closing this PR.