Closed Biubush closed 6 months ago
Can you post your docker compose file?
Essentially you have to do everything in the "How to use" section of the README
Hi @Biubush! As @wkelton asked, could you share your Docker Compose file? It seems that you've defined the same container name multiple times, but I would only be able to research that theory if I know your setup.
Hi @Biubush! As @wkelton asked, could you share your Docker Compose file? It seems that you've defined the same container name multiple times, but I would only be able to research that theory if I know your setup.
Sure! Since I modified the internal and external port parameters of the already existing palworld-server, I made a little change. Here is my Docker Compose file:
version: "3"
services:
server:
image: thijsvanloef/palworld-server-docker:latest
container_name: palworld-server
network_mode: service:watcher # This is important!
# Continue with your own configuration
watcher:
image: dnwjn/palworld-server-watcher:latest
container_name: palworld-watcher
environment:
- CONTAINER_NAME=palworld-server # The name of the server container
- GAME_PORT=65347 # The same value as `PORT` in the server container
- QUERY_PORT=38225 # The same value as `QUERY_PORT` in the server container
- LOOP_SLEEP_SECONDS=30 # How often to check the server status
- CONNECT_GRACE_SECONDS=60 # After starting the server, how long to wait before continuing the loop
ports:
- 65347:65347/udp # The same value as `GAME_PORT`
- 38225:38225/udp # Enable to show up in the server list
volumes:
- /var/run/docker.sock:/var/run/docker.sock # This could be different depending on the operating system
@Biubush Thanks for providing your setup! Using your config I'm unable to reproduce your issue:
This makes me believe that you already have a Docker container running for the server, either via another Docker Compose config or directly through docker run
. Can you make sure this is not the case?
If you do have your server running a different way it's important that you migrate it to the same Docker Compose file so it can use the same network as the watcher (needed for the watcher starting/stopping the server, as well as routing the traffic).
I'm not quite sure how to use this script. I thought it was about spinning up another container to monitor the palworld-server container I've already deployed. However, when I tried 'docker-compose up,' I encountered the following error:
So, does it mean it's actually trying to recreate a container named palworld-server for me? If so, how can I specify parameters like --env-file for this container?