mirror of
https://github.com/YuzuZensai/palworld-server-docker.git
synced 2026-01-31 14:57:59 +00:00
Switched to superchronic
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -5,7 +5,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
xdg-user-dirs=0.17-2 \
|
xdg-user-dirs=0.17-2 \
|
||||||
procps=2:3.3.17-5 \
|
procps=2:3.3.17-5 \
|
||||||
wget=1.21-1+deb11u1 \
|
wget=1.21-1+deb11u1 \
|
||||||
cron \
|
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
@@ -14,6 +13,17 @@ RUN wget -q https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.
|
|||||||
mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli && \
|
mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli && \
|
||||||
rmdir /tmp/dumps
|
rmdir /tmp/dumps
|
||||||
|
|
||||||
|
# Latest releases available at https://github.com/aptible/supercronic/releases
|
||||||
|
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.2.29/supercronic-linux-amd64 \
|
||||||
|
SUPERCRONIC=supercronic-linux-amd64 \
|
||||||
|
SUPERCRONIC_SHA1SUM=cd48d45c4b10f3f0bfdd3a57d054cd05ac96812b
|
||||||
|
|
||||||
|
RUN curl -fsSLO "$SUPERCRONIC_URL" \
|
||||||
|
&& echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
|
||||||
|
&& chmod +x "$SUPERCRONIC" \
|
||||||
|
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
|
||||||
|
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
|
||||||
|
|
||||||
ENV PORT= \
|
ENV PORT= \
|
||||||
PUID=1000 \
|
PUID=1000 \
|
||||||
PGID=1000 \
|
PGID=1000 \
|
||||||
|
|||||||
@@ -22,10 +22,6 @@ term_handler() {
|
|||||||
tail --pid=$killpid -f 2>/dev/null
|
tail --pid=$killpid -f 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "${BACKUP_ENABLED}" = true ]; then
|
|
||||||
service cron start
|
|
||||||
fi
|
|
||||||
|
|
||||||
trap 'term_handler' SIGTERM
|
trap 'term_handler' SIGTERM
|
||||||
|
|
||||||
su steam -c ./start.sh &
|
su steam -c ./start.sh &
|
||||||
|
|||||||
@@ -293,8 +293,8 @@ if [ "${BACKUP_ENABLED}" = true ]; then
|
|||||||
echo "BACKUP_ENABLED=${BACKUP_ENABLED}"
|
echo "BACKUP_ENABLED=${BACKUP_ENABLED}"
|
||||||
|
|
||||||
# Assuming BACKUP_CRON_EXPRESSION is set and is valid
|
# Assuming BACKUP_CRON_EXPRESSION is set and is valid
|
||||||
echo "$BACKUP_CRON_EXPRESSION bash /usr/local/bin/backup >/dev/null 2>&1" > "/home/steam/server/crontab"
|
echo "$BACKUP_CRON_EXPRESSION bash /usr/local/bin/backup" > "/home/steam/server/crontab"
|
||||||
crontab "/home/steam/server/crontab"
|
supercronic "/home/steam/server/crontab" &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Configure RCON settings
|
# Configure RCON settings
|
||||||
|
|||||||
Reference in New Issue
Block a user