Production cutover, public test, tmp-shots galleries, development flow

This commit is contained in:
2026-10-05 15:12:43 +02:00
parent 44d0c08698
commit 60dd597660
9 changed files with 138 additions and 10 deletions
+7 -3
View File
@@ -40,11 +40,15 @@ Tests boot their own server on port 8099; set `MOLODETZ_TEST_PORT` to a free por
## Docker
```
docker compose up -d --build # dev server on http://127.0.0.1:19847, reload on change
docker compose logs -f # follow logs
docker compose down # stop
docker compose up -d --build # staging dev server on http://127.0.0.1:19847, reload on change
docker compose -f docker-compose.test.yml up -d # public test server on http://127.0.0.1:19849
PROD_SECRET_KEY=... PROD_ADMIN_PASSWORD=... docker compose -f docker-compose.prod.yml up -d --build # production on :19848
docker compose logs -f # follow logs
docker compose down # stop
```
Each compose file is its own project (`molodetz-dev`, `molodetz-test`, `molodetz-prod`) with its own `./data/<env>` file mount, so the three never interfere. Production secrets come only from `PROD_SECRET_KEY` / `PROD_ADMIN_PASSWORD` and refuse to boot without them; `staging.app.molodetz.nl`, `molodetz-test.app.molodetz.nl`, and `molodetz.nl` proxy to `:19847`, `:19849`, and `:19848` (see `molohttp_deploy.md`).
The container runs the dev server (`uvicorn --reload`) with `./molodetz` mounted, so every saved change is live within seconds. Data lives in the file mount `./data/staging` (plain files, no named volumes anywhere). The admin account comes from `MOLODETZ_ADMIN_USERNAME` / `MOLODETZ_ADMIN_EMAIL` / `MOLODETZ_ADMIN_PASSWORD` (default password `staging-admin-pass-1`, override per shell); an empty password skips admin bootstrap. The compose port is fixed at `127.0.0.1:19847` and is what `staging.app.molodetz.nl` proxies to, so keep it stable.
```