Files
wibosim/Dockerfile
T
db9979andClaude Opus 5.5 939fe5def5 Version 0.9.0, Änderungsprotokoll und automatisches Update
- 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
2026-12-03 19:56:03 +00:00

22 lines
959 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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"]