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
This commit is contained in:
parent
3a56938172
commit
d26b262a90
6 changed files with 305 additions and 0 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# 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"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue