Merge pull request 'docs(deploy): add .env runtime preservation rules (BIT-25005)' (#17) from task/BIT-25008-env-preservation into main
Tests / writer-pipeline tests (push) Successful in 2m5s
Tests / bridge tests (push) Successful in 2m23s
Tests / frontend lib tests (push) Successful in 2m45s

docs(deploy): add .env runtime preservation rules (BIT-25005)
This commit was merged in pull request #17.
This commit is contained in:
spark committed 2026-06-11 17:21:00 +01:00
commit 6695e1d2c7
1 file changed
+16
+16
View File
@@ -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.