added
This commit is contained in:
1 parent
eac3d5dc45
commit
2a2b00733b
83 files changed
+4840
No files matched your search
@@ -0,0 +1,40 @@
|
||||
# Deployment
|
||||
|
||||
Production runs on `10.0.0.10` from `/srv/email-list-system`.
|
||||
|
||||
Deployment uses a reviewed Git revision, followed by a Docker Compose build on the VM. Secrets are supplied only through the VM's private `.env` file. The application has no public port; cron invokes its CLI commands.
|
||||
|
||||
Before build, deployment sets `EMAIL_LIST_GIT_COMMIT` to the exact reviewed revision. Docker injects it into the image, allowing authorization records to bind campaign content and templates to that revision without copying `.git` into the image.
|
||||
|
||||
## Private environment
|
||||
|
||||
The VM's `.env` is a complete private configuration file. It must retain the runtime path and telemetry settings when Postmark settings are added or changed. Required production keys are:
|
||||
|
||||
```dotenv
|
||||
EMAIL_LIST_GIT_COMMIT=<reviewed Git revision>
|
||||
EMAIL_LIST_PROVIDER=postmark
|
||||
EMAIL_LIST_HOST_DATA_DIR=/srv/email-list-system/runtime
|
||||
TELEMETRY_BASE_URL=http://10.0.0.20:8000
|
||||
TELEMETRY_API_TOKEN=<private token>
|
||||
POSTMARK_SERVER_TOKEN=<private server token>
|
||||
POSTMARK_BROADCAST_STREAM_ID=broadcast-list
|
||||
POSTMARK_FROM_NAME=PaddleNET
|
||||
[email protected]
|
||||
[email protected]
|
||||
```
|
||||
|
||||
Never replace the file with only newly added keys. In particular, omitting `EMAIL_LIST_HOST_DATA_DIR` makes Docker use its empty named-volume fallback instead of the private runtime directory containing the production SQLite database.
|
||||
|
||||
## Release procedure
|
||||
|
||||
1. Pull the reviewed revision with the [HTTPS Git deployment procedure](git-deployment-access.md).
|
||||
2. Update `EMAIL_LIST_GIT_COMMIT` in the VM's private `.env` to the pulled revision.
|
||||
3. Run `docker compose build`.
|
||||
4. Run `docker compose run --rm email-list system check --json`.
|
||||
5. For a Postmark configuration or template change, run `docker compose run --rm email-list suppression reconcile --dry-run --json` and complete one separately authorized, single-recipient verification before any list-wide send.
|
||||
|
||||
Set `EMAIL_LIST_HOST_DATA_DIR=/srv/email-list-system/runtime` in the VM's private `.env`. This mounts the private runtime directory at `/data`, including `/data/inbox/subscriber-operations.jsonl`; it must never be committed or copied into the image.
|
||||
|
||||
The container runs as non-root UID `1000`, matching the deployed `deploy-user` account. Keep the runtime directory owned by that account so SQLite, backups, logs, and receipts can be written without granting the container root access.
|
||||
|
||||
Before a production send, deployment validation must confirm the container health check, database backup creation, Postmark suppression access, delivery webhook health, and the Ops Monitor telemetry API contract.
|
||||
Reference in new issue
Block a user