Skip to content

Commit

Permalink
Merge pull request #5 from thijsvanloef/update-on-boot
Browse files Browse the repository at this point in the history
add option to disable update on boot
  • Loading branch information
thijsvanloef authored Jan 19, 2024
2 parents 2b73f49 + 1f43e5b commit 187d564
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ ENV PORT=8211 \
PUBLIC_IP= \
PUBLIC_PORT= \
SERVER_PASSWORD= \
SERVER_NAME=
SERVER_NAME= \
UPDATE_ON_BOOT=true

COPY ./scripts/* /home/steam/server/
RUN chmod +x /home/steam/server/init.sh /home/steam/server/start.sh
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ It is highly recommended you set the following environment values before startin
| COMMUNITY | Whether or not the server shows up in the community server browser (USE WITH SERVER_PASSWORD) | false | true/false |
| PUBLIC_IP | You can manually specify the global IP address of the network on which the server running.If not specified, it will be detected automatically. If it does not work well, try manual configuration. | | x.x.x.x |
| PUBLIC_PORT | You can manually specify the port number of the network on which the server running.If not specified, it will be detected automatically. If it does not work well, try manual configuration. | | x.x.x.x |
| SERVER_NAME | A name for your community server | | "string" |
| SERVER_PASSWORD | Secure your community server with a password | | "string" |
| SERVER_NAME | A name for your community server | | "string" |
| SERVER_PASSWORD | Secure your community server with a password | | "string" |
| UPDATE_ON_BOOT | Update/Install the server when the docker container starts (THIS HAS TO BE ENABLED THE FIRST TIME YOU RUN THE CONTAINER) | true | true/false |

*highly recommended to set

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
- PORT=8211
- PLAYERS=16
- MULTITHREADING=false
- UPDATE_ON_BOOT=true
- COMMUNITY=false # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
# Enable the environment variables below if you have COMMUNITY=true
# - PUBLIC_PORT=123
Expand Down
10 changes: 7 additions & 3 deletions scripts/init.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/bin/sh
printf "\e[0;32m*****STARTING INSTALL/UPDATE*****\e[0m"

mkdir -p /palworld

chown -R steam:steam /palworld
/home/steam/steamcmd/steamcmd.sh +force_install_dir "/palworld" +login anonymous +app_update 2394010 validate +quit

# ln -s /home/steam/server/palworld /palworld
if [ "${UPDATE_ON_BOOT}" = true ]; then

printf "\e[0;32m*****STARTING INSTALL/UPDATE*****\e[0m"
/home/steam/steamcmd/steamcmd.sh +force_install_dir "/palworld" +login anonymous +app_update 2394010 validate +quit

fi

./start.sh

0 comments on commit 187d564

Please sign in to comment.