diff --git a/docs/deployment.md b/docs/deployment.md index 97099ab..dc9ab0d 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -4,6 +4,22 @@ --- +## `.env` preservation in deploy (BIT-25005) + +> Canonical rule: **`docs/DEPLOY_STANDARD.md` §3.1** — meta-repo `paperclip`. + +| Prohibited | Allowed | +|-----------|---------| +| `cp .env.example .env` over an **existing** `.env` in production | `git pull` / rsync **excluding** `.env` and `*.env` | +| Placeholder credentials (`changeme`, `secret`, `password`) in production | Vault values only; document new keys in `.env.example` **empty** | +| Changing `DB_*` / `DATABASE_*` without explicit issue, rollback plan, and log | Entry in `docs/PRODUCTION_ACCESS_SYNC_LOG.md` (meta-repo) before applying | + +Deploy scripts must fail (`exit 1`) if they would overwrite an existing `.env` with example content. + +> **Note:** any `cp .env.example .env` instructions in this document apply **only to initial server bootstrap** where no `.env` exists yet. On redeployments, the existing production `.env` must never be overwritten. + +--- + ## Overview The platform runs on a single LXC container on Proxmox for the initial test deployment. The container hosts all services: Nginx reverse proxy, Astro frontend (Node.js), Fastify bridge (Node.js), WordPress (Docker), MariaDB (Docker), and Redis.