Commit Graph

7 Commits (d05c7ee31b3f7e39f6a838a9aaecdc0b12f0b3f5)

Author SHA1 Message Date
Thomas Joise 1727918173 feat(deploy): hardcode DB connection + owner email (no .env), update docs
Team decision: production DB connection and first-boot owner email are hardcoded in the app instead of a .env file, matching the box's other apps. Gated to NODE_ENV=production so dev/tests keep using SQLite (389 tests green). Committed value is the CHANGE_ME_PASSWORD placeholder; the real password is set only on the box, never pushed. server.ts: HARDCODED_DATABASE_URL. seed.ts: OWNER_EMAIL default. docker-compose.yml: drop env_file. docs: PATHS-AND-NAMES.md + .env.example updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 days ago
Thomas Joise 60dcd823ff docs(deploy): add backend/devops convention questions checklist
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 days ago
Thomas Joise 1d715e6a64 fix(sec/d24): nginx sends X-Forwarded-For as $remote_addr (replace, not append)
With the app's trust-proxy=1, an appended client-supplied XFF header would let a
caller spoof req.ip and bypass the per-IP login/reveal rate limiters. Replacing
with $remote_addr (the unforgeable socket peer) keys the limiters on the true
client.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4 days ago
Thomas Joise a11d650416 docs(deploy): HQ connects as shared postgres superuser (no per-app roles on box)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 days ago
Thomas Joise 9a9de711b5 docs(deploy): correct Gitea URL to SIMS/sims-hq (repo moved)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 days ago
Thomas Joise a7b3ade22e chore(deploy): rename nginx vhost to sims.hq.conf + add paths/names reference
One name end to end: deploy/nginx-hq.conf -> deploy/sims.hq.conf matching /etc/nginx/conf.d/sims.hq.conf. Add deploy/PATHS-AND-NAMES.md as the single production reference (paths, names, ports, everyday commands).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 days ago
Thomas Joise 08e3c02ae7 chore(deploy): track the container + nginx deploy setup
Production hosting artifacts (D20 hosting slice), previously untracked:
- Dockerfile: node:20-bookworm image, Chromium libs for puppeteer, builds
  web + server, runs server.cjs on 5182
- docker-compose.yml: single hq service, external accurate-postgres via
  host.docker.internal, localhost-bound (host nginx terminates TLS), env_file
- deploy/nginx-hq.conf: the reverse-proxy config

No secrets — .env and data stay gitignored and out of the image (.dockerignore).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4 days ago