This commit is contained in:
2026-11-17 17:51:13 +01:00
commit ce2962e39e
71 changed files with 968 additions and 0 deletions

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
# Politické karty – no npm dependencies, so no install step is needed.
FROM node:22-alpine
ENV NODE_ENV=production PORT=3000
WORKDIR /app
# Copy only what the server needs at runtime; files stay owned by root (read-only for the app user).
COPY package.json server.js ./
COPY public ./public
# Run as the unprivileged "node" user that ships with the image.
USER node
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "fetch('http://127.0.0.1:'+(process.env.PORT||3000)+'/api/ping').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
CMD ["node", "server.js"]