Configure dedicated server timezone
This commit is contained in:
parent
220cfd2354
commit
185538b819
5 changed files with 14 additions and 4 deletions
|
|
@ -1,6 +1,9 @@
|
|||
FROM debian:bookworm-slim
|
||||
|
||||
RUN groupadd --system --gid 10001 netfishing \
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& groupadd --system --gid 10001 netfishing \
|
||||
&& useradd --system --uid 10001 --gid netfishing \
|
||||
--home-dir /var/lib/netfishing-server netfishing \
|
||||
&& install -d -o netfishing -g netfishing \
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -61,7 +61,11 @@ sudo ./scripts/rollback-native.sh
|
|||
```
|
||||
|
||||
Copy `config/server.cfg.example` to `/etc/netfishing-server.cfg` and adjust the
|
||||
room name, UDP port, player limit, and public-listing preference. Forward the
|
||||
room name, UDP port, player limit, and public-listing preference. Set `TZ` in
|
||||
`/etc/netfishing-server.env` to an IANA timezone such as `America/New_York` when
|
||||
the server's world should follow that region's wall clock and daylight-saving
|
||||
rules; the packaged default is `UTC`. The timezone must be present before the
|
||||
server process starts, so restart the service after changing it. Forward the
|
||||
configured UDP port through the host firewall and router when accepting
|
||||
Internet players.
|
||||
|
||||
|
|
@ -135,8 +139,8 @@ docker compose up -d
|
|||
```
|
||||
|
||||
Set values such as `NETFISHING_SERVER_NAME`, `NETFISHING_SERVER_PORT`,
|
||||
`NETFISHING_SERVER_MAX_PLAYERS`, `NETFISHING_SERVER_PUBLIC`, and the optional
|
||||
comma-separated `NETFISHING_SERVER_OPERATORS` in a local `.env` file. The
|
||||
`NETFISHING_SERVER_MAX_PLAYERS`, `NETFISHING_SERVER_PUBLIC`, `TZ`, and the
|
||||
optional comma-separated `NETFISHING_SERVER_OPERATORS` in a local `.env` file. The
|
||||
Compose service runs without Linux capabilities, uses a read-only root
|
||||
filesystem, and stores persistent state in a named volume.
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ services:
|
|||
NETFISHING_SERVER_PUBLIC: "${NETFISHING_SERVER_PUBLIC:-false}"
|
||||
NETFISHING_DISCOVERY_URL: "${NETFISHING_DISCOVERY_URL:-https://discovery.netfishing.org}"
|
||||
NETFISHING_DATA_DIR: /var/lib/netfishing-server
|
||||
TZ: "${TZ:-UTC}"
|
||||
NETFISHING_SERVER_OPERATORS: "${NETFISHING_SERVER_OPERATORS:-}"
|
||||
volumes:
|
||||
- netfishing-server-data:/var/lib/netfishing-server
|
||||
|
|
|
|||
|
|
@ -5,4 +5,5 @@ NETFISHING_SERVER_MAX_PLAYERS=8
|
|||
NETFISHING_SERVER_PUBLIC=false
|
||||
NETFISHING_DISCOVERY_URL=https://discovery.netfishing.org
|
||||
NETFISHING_DATA_DIR=/var/lib/netfishing-server
|
||||
TZ=UTC
|
||||
NETFISHING_SERVER_OPERATORS=
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ Type=simple
|
|||
User=netfishing
|
||||
Group=netfishing
|
||||
WorkingDirectory=/opt/netfishing-server/current
|
||||
Environment=TZ=UTC
|
||||
EnvironmentFile=-/etc/netfishing-server.env
|
||||
ExecStart=/opt/netfishing-server/current/NETfishingServer.x86_64 -- --config=/etc/netfishing-server.cfg
|
||||
Restart=on-failure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue