docs(deploy): add .env runtime preservation rules (BIT-25005) #17

Merged
spark merged 1 commits from task/BIT-25008-env-preservation into main 2026-06-11 17:21:01 +01:00
+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.