elorasmus/Dockerfile
agent d26b262a90 Add container setup and docs
Dockerfile (pinned node:26.13.0-alpine3.24, non-root, no npm install) and
compose.yaml (loopback by default, read-only root fs, dropped capabilities,
healthcheck, named volume). Every setting is an env var, documented in
.env.example and README.md. AGENTS.md records project conventions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3
2026-11-12 20:55:35 +00:00

20 lines
592 B
Docker

# Elorasmus: the server uses only Node's standard library, so there is no npm install step.
FROM docker.io/library/node:26.13.0-alpine3.24
ENV NODE_ENV=production \
HOST=0.0.0.0 \
PORT=8317 \
DATA_DIR=/data
WORKDIR /app
COPY package.json ./
COPY server ./server
COPY public ./public
# /data holds picks, notes and settings. Owned by the image's unprivileged "node" user so a
# fresh named volume is writable (Docker and Podman both copy this ownership into it).
RUN mkdir -p /data && chown node:node /data
USER node
VOLUME ["/data"]
EXPOSE 8317
CMD ["node", "server/index.js"]