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
43
compose.yaml
Normal file
43
compose.yaml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# Elorasmus. Run with `docker compose up -d --build` or `podman compose up -d --build`.
|
||||
# Configuration: copy .env.example to .env (chmod 600) and edit. Every variable is optional.
|
||||
services:
|
||||
elorasmus:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
# Loopback by default: reach it via a reverse proxy, VPN or SSH tunnel.
|
||||
# ELORASMUS_BIND=0.0.0.0 publishes on all interfaces; set AUTH_PASSWORD before doing that.
|
||||
- "${ELORASMUS_BIND:-127.0.0.1}:${ELORASMUS_PORT:-8317}:8317"
|
||||
environment:
|
||||
AUTH_PASSWORD: ${AUTH_PASSWORD:-}
|
||||
SESSION_SECRET: ${SESSION_SECRET:-}
|
||||
SESSION_DAYS: ${SESSION_DAYS:-180}
|
||||
COOKIE_SECURE: ${COOKIE_SECURE:-auto}
|
||||
TRUST_PROXY: ${TRUST_PROXY:-false}
|
||||
BASE_PATH: ${BASE_PATH:-/}
|
||||
APP_TITLE: ${APP_TITLE:-Elorasmus}
|
||||
STAY_MONTHS: ${STAY_MONTHS:-5}
|
||||
ELO_INITIAL: ${ELO_INITIAL:-1500}
|
||||
ELO_K_MAX: ${ELO_K_MAX:-48}
|
||||
ELO_K_MIN: ${ELO_K_MIN:-16}
|
||||
EUR_CZK: ${EUR_CZK:-}
|
||||
LOG_REQUESTS: ${LOG_REQUESTS:-false}
|
||||
volumes:
|
||||
- elorasmus-data:/data
|
||||
# Hardening: the app only writes to /data.
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
cap_drop:
|
||||
- ALL
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:8317/healthz').then(r=>process.exit(r.ok?0:1),()=>process.exit(1))"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
volumes:
|
||||
elorasmus-data:
|
||||
Loading…
Add table
Add a link
Reference in a new issue