Files
tiefenkontakt/Dockerfile
T
db9979 7b0a071e8e Add bridge lookouts, radar room, ops tooling, graphic mails and Pi deploy
- Escorts: bridge lookouts (periscope feather, snorkel, surfaced boats,
  torpedo tracks), spoken sighting reports, 3D bridge station with
  binoculars and own foredeck, lookout hit inset
- 3D sea split into models/shaders: multi-wave ocean with whitecaps,
  clouds, sun and moon, detailed ships with smoke and turning radar
- Radar room rebuilt as phosphor PPI with range scales, ESM rose and
  radar status; NATO symbols on plot, mission charts and replay
- Sortable and filterable contact list, leaderboard and alert log;
  smoothed list bearings; clear convoy progress bar
- Ops: backups, metrics, structured logs, CI, Elo ratings, private
  matches, corvette and coastal sub, network load test
- Mail: configurable SMTP (Gmail/iCloud), signal-style HTML mails with
  inline sonar header, mail test command
- Fixes: spoofable client IP behind proxy, phone layout and lost taps,
  stacked debriefs, station 5 rejected by server
- Raspberry Pi deploy script and .env.example
2026-11-22 09:15:08 +01:00

25 lines
961 B
Docker

# Tiefenkontakt: game server + built client on one port. Put your HTTPS reverse proxy in front.
FROM node:22-slim
WORKDIR /app
COPY package.json package-lock.json tsconfig.base.json tsconfig.json vitest.config.ts ./
COPY packages/shared/package.json packages/shared/
COPY apps/server/package.json apps/server/
COPY apps/client/package.json apps/client/
RUN npm ci
COPY . .
RUN npm run build
ENV NODE_ENV=production \
PORT=8787 \
TRUST_PROXY=1 \
DB_PATH=/data/tiefenkontakt.db \
MATCH_DIR=/data/matches \
BACKUP_DIR=/data/backups \
CLIENT_DIST=/app/apps/client/dist
VOLUME /data
EXPOSE 8787
WORKDIR /app/apps/server
HEALTHCHECK --interval=30s --timeout=3s --start-period=15s \
CMD node -e "fetch('http://localhost:8787/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
# Node itself is PID 1 so SIGTERM (docker stop) reaches the server, which saves running matches
CMD ["node", "--import", "tsx", "src/index.ts"]