Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the installer from git to steamcmd #1

Merged
merged 7 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ CFG_PASSWORD=""
CFG_COMMUNITY_WEBSITE="www.longvinter.com"
CFG_COOP_PLAY=false
CFG_COOP_SPAWN=0
CFG_SERVER_TAG="none"
CFG_TAG="none"
CFG_ADMIN_STEAM_ID=""
CFG_ENABLE_PVP=true
CFG_PVP=true
CFG_TENT_DECAY=true
CFG_MAX_TENTS=2
52 changes: 31 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,61 @@ LABEL maintainer="me@kimzuni.com" \

# set envs
# SUPERCRONIC: Latest releases available at https://github.com/aptible/supercronic/releases
# DEPOT_DOWNLOADER: Latest releases available at https://github.com/SteamRE/DepotDownloader/releases
# NOTICE: edit SUPERCRONIC_SHA1SUM when using binaries of another version or arch.
ARG SUPERCRONIC_SHA1SUM_ARM64="d5e02aa760b3d434bc7b991777aa89ef4a503e49"
ARG SUPERCRONIC_SHA1SUM_AMD64="9f27ad28c5c57cd133325b2a66bba69ba2235799"
ARG SUPERCRONIC_VERSION="0.2.30"

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG DEPOT_DOWNLOADER_VERSION="2.6.0"

# update and install dependencies
# hadolint ignore=DL3008
RUN apt-get update && \
apt-get install --no-install-recommends --no-install-suggests -y \
curl \
net-tools \
ca-certificates \
wget \
net-tools=2.10-0.1 \
ca-certificates=20230311 \
lib32gcc-s1-amd64-cross=12.2.0-14cross1 \
procps=2:4.0.2-3 \
gettext-base=0.21-12 \
xdg-user-dirs=0.18-1 \
jo=1.9-1 \
jq=1.6-2.1 \
netcat-traditional=1.10-47 \
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
&& apt-get --no-install-recommends --no-install-suggests -y \
install git git-lfs \
libicu72=72.1-3 \
unzip=6.0-28 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# install supercronic
# install supercronic and DepotDownloader
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG TARGETARCH
RUN case ${TARGETARCH} in \
"amd64") SUPERCRONIC_SHA1SUM=${SUPERCRONIC_SHA1SUM_AMD64} ;; \
"arm64") SUPERCRONIC_SHA1SUM=${SUPERCRONIC_SHA1SUM_ARM64} ;; \
RUN case "${TARGETARCH}" in \
"amd64") SUPERCRONIC_SHA1SUM="${SUPERCRONIC_SHA1SUM_AMD64}" ;; \
"arm64") SUPERCRONIC_SHA1SUM="${SUPERCRONIC_SHA1SUM_ARM64}" ;; \
esac \
&& curl -sfSL "https://github.com/aptible/supercronic/releases/download/v${SUPERCRONIC_VERSION}/supercronic-linux-${TARGETARCH}" -o supercronic \
&& wget --progress=dot:giga "https://github.com/aptible/supercronic/releases/download/v${SUPERCRONIC_VERSION}/supercronic-linux-${TARGETARCH}" -O supercronic \
&& echo "${SUPERCRONIC_SHA1SUM}" supercronic | sha1sum -c - \
&& chmod +x supercronic \
&& mv supercronic /usr/local/bin/supercronic

RUN case "${TARGETARCH}" in \
"amd64") DEPOT_DOWNLOADER_FILENAME="DepotDownloader-linux-x64.zip" ;; \
"arm64") DEPOT_DOWNLOADER_FILENAME="DepotDownloader-linux-arm64.zip" ;; \
esac \
&& wget --progress=dot:giga "https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_${DEPOT_DOWNLOADER_VERSION}/${DEPOT_DOWNLOADER_FILENAME}" -O DepotDownloader.zip \
&& unzip DepotDownloader.zip \
&& rm -rf DepotDownloader.zip DepotDownloader.xml \
&& chmod +x DepotDownloader \
&& mv DepotDownloader /usr/local/bin/DepotDownloader

# hadolint ignore=DL3044
ENV TZ="UTC" \
ENV HOME=/home/steam \
TZ="UTC" \
PUID=1000 \
PGID=1000 \
PORT=7777 \
QUERY_PORT=27016 \
UPDATE_ON_BOOT=true \
BACKUP_ENABLED=true \
BACKUP_CRON_EXPRESSION="0 0 * * *" \
Expand All @@ -80,7 +91,7 @@ ENV TZ="UTC" \
AUTO_REBOOT_EVEN_IF_PLAYERS_ONLINE=false \
BROADCAST_COUNTDOWN_SUSPEND_MESSAGE="Suspends countdown because there are no players." \
BROADCAST_COUNTDOWN_SUSPEND_MESSAGE_ENABLE=true \
TARGET_COMMIT_ID= \
TARGET_MANIFEST_ID= \
DISCORD_WEBHOOK_URL="" \
DISCORD_SUPPRESS_NOTIFICATIONS=false \
DISCORD_CONNECT_TIMEOUT=30 \
Expand All @@ -100,9 +111,6 @@ ENV TZ="UTC" \
DISCORD_PRE_START_MESSAGE="Server has been started!" \
DISCORD_PRE_START_MESSAGE_ENABLED=true \
DISCORD_PRE_START_MESSAGE_URL="" \
DISCORD_PRE_START_MESSAGE_WITH_GAME_SETTINGS=true \
DISCORD_PRE_START_MESSAGE_WITH_SERVER_IP=false \
DISCORD_PRE_START_MESSAGE_WITH_DOMAIN="" \
DISCORD_PRE_SHUTDOWN_MESSAGE="Server is shutting down..." \
DISCORD_PRE_SHUTDOWN_MESSAGE_ENABLED=true \
DISCORD_PRE_SHUTDOWN_MESSAGE_URL="" \
Expand Down Expand Up @@ -135,7 +143,9 @@ ENV TZ="UTC" \
DISABLE_GENERATE_SETTINGS=false \
ENABLE_PLAYER_LOGGING=true \
PLAYER_LOGGING_POLL_PERIOD=5 \
ARM64_DEVICE=generic
ARM64_DEVICE=generic \
USE_DEPOT_DOWNLOADER=false \
INSTALL_BETA_VERSION=false

# Sane Box64 config defaults
# hadolint ignore=DL3044
Expand All @@ -150,7 +160,7 @@ ENV BOX64_DYNAREC_STRONGMEM=1 \
ARG GIT_VERSION_TAG=unspecified

COPY --chmod=755 ./scripts /home/steam/server
RUN for file in backup.sh update.sh restore.sh reboot.sh broadcast.sh; do \
RUN for file in backup.sh update.sh restore.sh broadcast.sh; do \
mv /home/steam/server/"$file" /usr/local/bin/"${file%.sh}"; \
done

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ services:
CFG_COMMUNITY_WEBSITE: "www.longvinter.com"
CFG_COOP_PLAY: false
CFG_COOP_SPAWN: 0
CFG_SERVER_TAG: "none"
CFG_TAG: "none"
CFG_ADMIN_STEAM_ID: ""
CFG_ENABLE_PVP: true
CFG_PVP: true
CFG_TENT_DECAY: true
CFG_MAX_TENTS: 2
volumes:
Expand Down
Loading