mirror of
https://github.com/db9979/wibosim.git
synced 2026-12-06 13:34:09 +01:00
- Versionsnummer, Build (Git-Commit) und Bauzeit unter /api/version, in /api/info und hello - Änderungsprotokoll für Spieler unter /api/changelog (Test prüft Übereinstimmung mit package.json) - Server meldet Neustarts an die Clients; statische Dateien ohne langes Zwischenspeichern - Admin: Hinweis, wenn auf GitHub eine neuere Version liegt - Pi: scripts/install-autoupdate.sh (systemd-Timer oder cron) mit Zeitfenster, Gesundheitscheck und automatischem Zurückrollen - CI übergibt Bauzeit ans Image; Doku zu Updates, Versionen und KI-Auswertung Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUhQVoPUusUzxgxLWkK
22 lines
959 B
Docker
22 lines
959 B
Docker
# WiBoSim – läuft auf amd64 und arm64 (Raspberry Pi 4/5, 64-bit OS)
|
||
FROM node:22-alpine
|
||
ARG VERSION=dev
|
||
ARG BUILT_AT=
|
||
LABEL org.opencontainers.image.source="https://github.com/db9979/wibosim" \
|
||
org.opencontainers.image.title="WiBoSim" \
|
||
org.opencontainers.image.version="${VERSION}"
|
||
ENV NODE_ENV=production PORT=8086 DATA_DIR=/data WIBOSIM_VERSION=${VERSION} WIBOSIM_BUILT_AT=${BUILT_AT}
|
||
WORKDIR /app
|
||
COPY server/package*.json ./
|
||
RUN npm ci --omit=dev && npm cache clean --force
|
||
COPY server/src ./src
|
||
COPY server/public ./public
|
||
RUN rm -f src/*.test.js && mkdir -p /data && chown node:node /data
|
||
USER node
|
||
EXPOSE 8086
|
||
VOLUME ["/data"]
|
||
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD wget -qO- http://127.0.0.1:8086/api/health || exit 1
|
||
# Node beendet sich bei SIGTERM sauber (Spielstand wird geschrieben); genügend Zeit lassen
|
||
STOPSIGNAL SIGTERM
|
||
CMD ["node", "--disable-warning=ExperimentalWarning", "src/index.js"]
|