Skip to content

Commit 476d0e8

Browse files
authored
Release v2 (#10)
* Palworld to GSM * Update gsm-reference * GSM reference * GSM reference * with branches main * sha for release
1 parent 5a50724 commit 476d0e8

File tree

9 files changed

+170
-626
lines changed

9 files changed

+170
-626
lines changed

β€Ž.github/workflows/release.yamlβ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Docker Release
22

3-
on:
3+
on:
4+
pull_request:
5+
branches:
6+
- main
47
workflow_dispatch:
58
push:
69
tags:

β€ŽDockerfileβ€Ž

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,30 @@ RUN apt-get update \
1212
&& apt-get install -y -qq \
1313
build-essential \
1414
htop net-tools nano gcc g++ gdb \
15-
netcat curl wget zip unzip \
15+
curl wget zip unzip \
1616
cron sudo gosu dos2unix jq \
17-
tzdata python3 python3-pip \
17+
tzdata \
1818
&& rm -rf /var/lib/apt/lists/* \
1919
&& gosu nobody true \
2020
&& dos2unix
2121

22-
RUN addgroup --system steam \
23-
&& adduser --system \
24-
--home /home/steam \
25-
--shell /bin/bash \
26-
steam \
27-
&& usermod -aG steam steam \
22+
# Remove any existing user or group with ID 1000
23+
RUN if getent passwd 1000 > /dev/null; then userdel $(getent passwd 1000 | cut -d: -f1); fi \
24+
&& if getent group 1000 > /dev/null; then groupdel $(getent group 1000 | cut -d: -f1); fi \
25+
&& groupadd -g 1000 steam \
26+
&& useradd -u 1000 -g 1000 \
27+
-d /home/steam \
28+
-s /bin/bash \
29+
-m steam \
2830
&& chmod ugo+rw /tmp/dumps
29-
#COPY --chown=steam:steam /root/.steam /home/steam/.steam
30-
#COPY --chown=steam:steam /root/.local /home/steam/.local
3131

3232

3333
# Container informaiton
3434
ARG GITHUB_SHA="not-set"
3535
ARG GITHUB_REF="not-set"
3636
ARG GITHUB_REPOSITORY="not-set"
3737

38-
ENV PUID=1000
39-
ENV PGID=1000
40-
41-
RUN usermod -u ${PUID} steam \
42-
&& groupmod -g ${PGID} steam \
43-
&& echo "steam ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
38+
RUN echo "steam ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
4439

4540
USER steam
4641

@@ -55,19 +50,20 @@ COPY --chown=${PUID}:${PGID} ./Pipfile ./Pipfile.lock /home/steam/scripts/
5550

5651
ENV PATH="/home/steam/.local/bin:${PATH}"
5752

58-
RUN pip3 install pipenv \
59-
&& cd /home/steam/scripts \
60-
&& pipenv install --system --deploy --ignore-pipfile
53+
COPY --chown=${PUID}:${PGID} ./scripts/entrypoint.sh /entrypoint.sh
6154

62-
COPY --chown=${PUID}:${PGID} ./scripts /home/steam/scripts
55+
RUN mkdir -p $HOME/.steam \
56+
&& mkdir -p $HOME/palworld \
57+
&& ln -s $HOME/.local/share/Steam/steamcmd/linux32 $HOME/.steam/sdk32 \
58+
&& ln -s $HOME/.local/share/Steam/steamcmd/linux64 $HOME/.steam/sdk64 \
59+
&& ln -s $HOME/.steam/sdk32/steamclient.so $HOME/.steam/sdk32/steamservice.so || true \
60+
&& ln -s $HOME/.steam/sdk64/steamclient.so $HOME/.steam/sdk64/steamservice.so || true
6361

62+
WORKDIR /home/steam/palworld
6463

6564
EXPOSE 8211/udp
6665
EXPOSE 27015/udp
6766

68-
RUN echo "source /home/steam/scripts/utils.sh" >> /home/steam/.bashrc
69-
70-
#HEALTHCHECK --interval=1m --timeout=3s \
71-
# CMD pidof valheim_server.x86_64 || exit 1
67+
COPY --from=mbround18/gsm-reference:sha-7ec6fa9 /app/palworld /usr/local/bin/palworld
7268

73-
ENTRYPOINT ["/bin/bash","/home/steam/scripts/entrypoint.sh"]
69+
ENTRYPOINT ["/entrypoint.sh"]

β€ŽMakefileβ€Ž

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.PHONY: docker-build docker-dev docker-push
2+
GIT_TAG := $(shell git rev-parse --short HEAD)
3+
export COMPOSE_BAKE=true
4+
5+
docker-build:
6+
@docker compose build
7+
8+
docker-dev: docker-build
9+
@docker compose up --abort-on-container-exit
10+
11+
docker-push: docker-build
12+
@docker tag mbround18/palworld-docker:latest mbround18/palworld-docker:sha-$(GIT_TAG)
13+
@docker image push mbround18/palworld-docker:sha-$(GIT_TAG)
14+
@echo "Pushed mbround18/palworld-docker:sha-$(GIT_TAG)"

β€ŽREADME.mdβ€Ž

Lines changed: 61 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# Palworld Server
1+
# Palworld Server
22

3-
🌟 Welcome to the ultimate Palworld Server Setup! 🌍 This GitHub repository is your go-to toolkit πŸ› οΈ for launching a Palworld server in a snap using Docker! Choose from preset worlds like 'casual' πŸ–οΈ, 'normal' πŸŒ†, or 'hard' πŸŒ‹, or dive deep into customization with flexible settings πŸŽ›οΈ.
3+
[![Managed by GSM](https://img.shields.io/badge/Managed%20By-GSM-blue)](https://github.com/mbround18/game-server-management)
44

5+
🌟 Welcome to the ultimate Palworld Server Setup! 🌍 This GitHub repository is your go-to toolkit πŸ› οΈ for launching a Palworld server in a snap using Docker! Choose from preset worlds like 'casual' πŸ–οΈ, 'normal' πŸŒ†, or 'hard' πŸŒ‹, or dive deep into customization with flexible settings πŸŽ›οΈ.
56

67
## !!Notice!! Bug with saves, developers of Palworld working hard to fix!
78

@@ -22,18 +23,61 @@ The server can be configured either through environment variables or by passing
2223
- `normal`
2324
- `hard`
2425

25-
Additionally, you can customize the following settings:
26-
27-
- `DAY_TIME_SPEED_RATE`: Control the speed of day time.
28-
- `NIGHT_TIME_SPEED_RATE`: Control the speed of night time.
29-
- `EXP_RATE`: Experience points rate.
30-
- (And so on for each configurable option...)
26+
### Environment Variables
27+
28+
Below is a list of available environment variables to customize your server:
29+
30+
#### General Server Settings
31+
- `SERVER_NAME`: The name of your server.
32+
- `SERVER_DESCRIPTION`: A short description of your server.
33+
- `PUBLIC_IP`: Set the public IP of the server.
34+
- `PUBLIC_PORT`: The public port for connections.
35+
- `PORT`: The internal port of the game server.
36+
- `ADMIN_PASSWORD`: The password for admin access.
37+
- `SERVER_PASSWORD`: The password required to join the server.
38+
- `REGION`: Define the server’s region.
39+
- `USE_AUTH`: Enable authentication (`true` or `false`).
40+
41+
#### Performance and Networking
42+
- `MULTITHREADING`: Enable multithreading (`true` or `false`).
43+
- `RCON_ENABLED`: Enable remote console (`true` or `false`).
44+
- `RCON_PORT`: Port for RCON access.
45+
- `RESTAPI_ENABLED`: Enable REST API (`true` or `false`).
46+
- `RESTAPI_PORT`: Port for the REST API.
47+
- `MAX_BUILDING_LIMIT_NUM`: Maximum number of buildings allowed.
48+
49+
#### Gameplay and Balance
50+
- `EXP_RATE`: Modify experience rate multiplier.
51+
- `PAL_CAPTURE_RATE`: Adjust the Pal capture success rate.
52+
- `DAY_TIME_SPEED_RATE`: Adjust how fast daytime progresses.
53+
- `NIGHT_TIME_SPEED_RATE`: Adjust how fast nighttime progresses.
54+
- `DEATH_PENALTY`: Define what happens on player death.
55+
- `ENABLE_FAST_TRAVEL`: Allow fast travel (`true` or `false`).
56+
- `ENABLE_INVADER_ENEMY`: Enable invader enemies (`true` or `false`).
57+
- `HARDCORE`: Enable hardcore mode (`true` or `false`).
58+
- `PAL_LOST`: Determine if Pals are lost upon death (`true` or `false`).
59+
- `ITEM_WEIGHT_RATE`: Adjust item weight multiplier.
60+
- `PAL_DAMAGE_RATE_ATTACK`: Modify Pal attack damage.
61+
- `PAL_DAMAGE_RATE_DEFENSE`: Modify Pal defense rate.
62+
- `PLAYER_DAMAGE_RATE_ATTACK`: Modify player attack damage.
63+
- `PLAYER_DAMAGE_RATE_DEFENSE`: Modify player defense rate.
64+
- `WORK_SPEED_RATE`: Adjust work speed multiplier.
65+
- `AUTO_SAVE_SPAN`: Set the frequency of autosaves (in minutes).
66+
67+
#### Multiplayer and Guild Settings
68+
- `GUILD_PLAYER_MAX_NUM`: Maximum number of players per guild.
69+
- `BASE_CAMP_MAX_NUM_IN_GUILD`: Maximum number of camps per guild.
70+
- `ALLOW_CONNECT_PLATFORM`: Restrict platform connections (`Steam`, `Epic`, etc.).
71+
- `SHOW_PLAYER_LIST`: Display the online player list (`true` or `false`).
72+
- `CHAT_POST_LIMIT_PER_MINUTE`: Limit chat messages per minute.
73+
- `EXIST_PLAYER_AFTER_LOGOUT`: Keep players visible after logout (`true` or `false`).
74+
- `ENABLE_DEFENSE_OTHER_GUILD_PLAYER`: Enable defense against other guilds (`true` or `false`).
3175

3276
To see a full list of supported configuration options, see the [Environment Configuration Options](./docs/environment_variables.md) page.
3377

3478
## Using Docker Compose
3579

36-
To run the server with Docker Compose, you first need to create a `docker-compose.yml` file in the root of this repository with the following content:
80+
To run the server with Docker Compose, create a `docker-compose.yml` file with the following content:
3781

3882
```yaml
3983
version: "3.8"
@@ -42,14 +86,14 @@ services:
4286
image: mbround18/palworld-docker:latest
4387
environment:
4488
PRESET: "casual" # Options: casual, normal, hard
45-
MULTITHREADING: true # Optional, Allows for multithreading the server.
46-
# Optionally override specific settings:
47-
# DAY_TIME_SPEED_RATE: '1'
48-
# NIGHT_TIME_SPEED_RATE: '1'
49-
# And so on...
89+
MULTITHREADING: true # Enables multithreading
90+
PUBLIC_IP: "0.0.0.0"
91+
PUBLIC_PORT: "8211"
92+
SERVER_NAME: "My Palworld Server"
93+
EXP_RATE: "1.5"
5094
ports:
5195
- "8211:8211" # Default game port
52-
- "27015:27015" # steam query port
96+
- "27015:27015" # Steam query port
5397
volumes:
5498
- "./data:/home/steam/palworld"
5599
```
@@ -82,8 +126,9 @@ docker-compose down
82126
docker-compose up
83127
```
84128

85-
This process ensures that your server configuration is always up to date with your specifications.
129+
This ensures that your server configuration remains up to date.
86130

87131
## Contributions
88132

89133
Contributions to this project are welcome! Please submit a pull request or open an issue for any bugs, features, or improvements.
134+

β€Ždocker-compose.ymlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ services:
88
- linux/amd64
99
environment:
1010
PRESET: "Normal"
11+
SERVER_PASSWORD: "secure-password"
12+
ADMIN_PASSWORD: "super-secret-password"
1113
ports:
1214
- "8211:8211"
1315
- "27015:27015"

0 commit comments

Comments
Β (0)