From 69e7b1406b245c1c49720d48ccfddef17b8de67c Mon Sep 17 00:00:00 2001 From: Claude Fable 5 Date: Tue, 14 Jul 2026 12:43:29 +0200 Subject: [PATCH] Move the stage directories to /srv/DOCKER (host consolidation) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ONE consolidated every Docker stack under /srv/DOCKER (BASEL convention, tracked in stwaidele/infrastructure-one); the three Dorfteich stages follow. Deploy targets in cd.yml (test/int) and prod-deploy.yml plus the docs now point at /srv/DOCKER/dorfteich-. Data lives in named volumes keyed by the unchanged compose project name, so the directory move carries no data migration. The go-live checklist's uptime-kuma path already lives under /srv/DOCKER — the doc just catches up. Deliberately committed together with the host-side move: this commit must not deploy before the directories exist at the new path. Co-Authored-By: Claude Fable 5 --- .gitea/workflows/cd.yml | 4 ++-- .gitea/workflows/prod-deploy.yml | 2 +- deploy/go-live.md | 4 ++-- deploy/stages.md | 8 ++++---- docs/architecture/adr/0014-gitea-actions-cicd.md | 2 +- docs/architecture/deployment.md | 8 ++++---- docs/operations/restore-runbook.md | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/cd.yml b/.gitea/workflows/cd.yml index 7e30f38..3f7401d 100644 --- a/.gitea/workflows/cd.yml +++ b/.gitea/workflows/cd.yml @@ -68,7 +68,7 @@ jobs: - name: Pull and restart the Test stack run: | - ssh deploy@$DEPLOY_HOST 'cd /home/DOCKER/dorfteich-test \ + ssh deploy@$DEPLOY_HOST 'cd /srv/DOCKER/dorfteich-test \ && docker compose pull --quiet && docker compose up -d --remove-orphans \ && docker compose ps' @@ -138,6 +138,6 @@ jobs: - name: Pull and restart the Int stack run: | - ssh deploy@$DEPLOY_HOST 'cd /home/DOCKER/dorfteich-int \ + ssh deploy@$DEPLOY_HOST 'cd /srv/DOCKER/dorfteich-int \ && docker compose pull --quiet && docker compose up -d --remove-orphans \ && docker compose ps' diff --git a/.gitea/workflows/prod-deploy.yml b/.gitea/workflows/prod-deploy.yml index 79f525e..0f645ad 100644 --- a/.gitea/workflows/prod-deploy.yml +++ b/.gitea/workflows/prod-deploy.yml @@ -44,7 +44,7 @@ jobs: - name: Pin the version and restart the Prod stack run: | - ssh deploy@$DEPLOY_HOST "cd /home/DOCKER/dorfteich-prod \ + ssh deploy@$DEPLOY_HOST "cd /srv/DOCKER/dorfteich-prod \ && sed -i 's/^TAG=.*/TAG=$VERSION/' .env \ && docker compose pull --quiet && docker compose up -d --remove-orphans \ && docker compose ps" diff --git a/deploy/go-live.md b/deploy/go-live.md index 2b46350..c3b628b 100644 --- a/deploy/go-live.md +++ b/deploy/go-live.md @@ -19,7 +19,7 @@ the DNS switch. for readiness. Re-deploys/rollbacks are new suffix tags on the target release. - [x] 2026-07-12 — **Prod stack provisioned** on ONE - (`/home/DOCKER/dorfteich-prod/`, ports 8120–8122, secrets generated + (`/srv/DOCKER/dorfteich-prod/`, ports 8120–8122, secrets generated on the host, full backup profile: 30 d retention, failure mail). The host decision "ONE" is the working default — recorded here; if the owner picks different iron at go-live, the stack directory @@ -48,7 +48,7 @@ the DNS switch. - [x] **Legal texts** (#82): paste the real dorfteich.online imprint and privacy policy in Administration → Legal pages. - [x] **Monitors** (#85, done 2026-07-12): a fresh Uptime-Kuma runs on - ONE (`kuma.101010.cloud`, `/home/DOCKER/uptime-kuma/`, bound to + ONE (`kuma.101010.cloud`, `/srv/DOCKER/uptime-kuma/`, bound to 127.0.0.1:8130 behind Caddy). All four Prod monitors from `deploy/monitoring.md` are live and green (`prod web`, `prod api ready`, `prod api degraded` keyword, `prod collab` diff --git a/deploy/stages.md b/deploy/stages.md index cd2d845..6737ed9 100644 --- a/deploy/stages.md +++ b/deploy/stages.md @@ -11,14 +11,14 @@ owner; everything else can be done by CI or a deploy user. | Stage | Directory | Domain | Ports (localhost) | | ----- | ------------------------------ | ---------------------- | ------------------------------- | -| Test | `/home/DOCKER/dorfteich-test/` | `test.dorfteich.cloud` | web 8100, api 8101, collab 8102 | -| Int | `/home/DOCKER/dorfteich-int/` | `int.dorfteich.cloud` | web 8110, api 8111, collab 8112 | +| Test | `/srv/DOCKER/dorfteich-test/` | `test.dorfteich.cloud` | web 8100, api 8101, collab 8102 | +| Int | `/srv/DOCKER/dorfteich-int/` | `int.dorfteich.cloud` | web 8110, api 8111, collab 8112 | ## 1. Stage directories **[root]** ```sh for stage in test int; do - mkdir -p /home/DOCKER/dorfteich-$stage + mkdir -p /srv/DOCKER/dorfteich-$stage mkdir -p /home/RAID/DOCKER/dorfteich-$stage # bulk data, if RAID exists on this host done ``` @@ -103,7 +103,7 @@ act_runner register \ ## 4. Deploy user and SSH keys The CD workflow (issue #8) deploys via SSH: -`ssh deploy@one.101010.cloud 'cd /home/DOCKER/dorfteich-test && docker compose pull && docker compose up -d'`. +`ssh deploy@one.101010.cloud 'cd /srv/DOCKER/dorfteich-test && docker compose pull && docker compose up -d'`. - **[root]** Create a `deploy` user (or reuse an existing deployment user), member of the `docker` group, owning the stage directories. diff --git a/docs/architecture/adr/0014-gitea-actions-cicd.md b/docs/architecture/adr/0014-gitea-actions-cicd.md index 85adcc4..1051753 100644 --- a/docs/architecture/adr/0014-gitea-actions-cicd.md +++ b/docs/architecture/adr/0014-gitea-actions-cicd.md @@ -37,7 +37,7 @@ gates must be automated and objective wherever possible. start (ADR 0006); releases with breaking migrations must say so in the release notes. - **Deploy mechanism**: the runner executes `docker compose pull && docker -compose up -d` in the stage's directory (`/home/DOCKER/dorfteich-/`) +compose up -d` in the stage's directory (`/srv/DOCKER/dorfteich-/`) over SSH (deploy key per stage). Moving Prod to a dedicated host later changes only that SSH target. - **Self-hosters** consume the same release images via a published diff --git a/docs/architecture/deployment.md b/docs/architecture/deployment.md index 2dd85d2..6a7225e 100644 --- a/docs/architecture/deployment.md +++ b/docs/architecture/deployment.md @@ -51,12 +51,12 @@ Self-hosters without a proxy can enable the optional `caddy` Compose profile | Stage | Where | Domain | Purpose | Data | | -------- | ----------------------------------------------------------------- | ---------------------- | --------------------------------------------------------------------------------------- | ------------------------------- | | **Dev** | contributor machine (e.g. the operator's MacBook), Docker Desktop | `localhost` | feature work; hot reload via `compose.dev.yml` overlay (source mounts, vite dev server) | fixtures/seed script | -| **Test** | ONE `one.101010.cloud`, `/home/DOCKER/dorfteich-test/` | `test.dorfteich.cloud` | auto-deploy target of `main`; e2e suite runs here | reset-able; seeded | -| **Int** | ONE `one.101010.cloud`, `/home/DOCKER/dorfteich-int/` | `int.dorfteich.cloud` | stable preview; manual/exploratory testing; release candidates | persistent test data | -| **Prod** | ONE `one.101010.cloud`, `/home/DOCKER/dorfteich-prod/` (M8, #89) | `dorfteich.online` | public flagship instance | real data; full backup + mirror | +| **Test** | ONE `one.101010.cloud`, `/srv/DOCKER/dorfteich-test/` | `test.dorfteich.cloud` | auto-deploy target of `main`; e2e suite runs here | reset-able; seeded | +| **Int** | ONE `one.101010.cloud`, `/srv/DOCKER/dorfteich-int/` | `int.dorfteich.cloud` | stable preview; manual/exploratory testing; release candidates | persistent test data | +| **Prod** | ONE `one.101010.cloud`, `/srv/DOCKER/dorfteich-prod/` (M8, #89) | `dorfteich.online` | public flagship instance | real data; full backup + mirror | Stage layout follows the operator's Docker host convention: -compose file + `.env` under `/home/DOCKER/dorfteich-/`, bulk data +compose file + `.env` under `/srv/DOCKER/dorfteich-/`, bulk data volumes under `/home/RAID/DOCKER/dorfteich-/` (bind-mounted). **Prod relocation readiness** (kickoff requirement): all state lives in the diff --git a/docs/operations/restore-runbook.md b/docs/operations/restore-runbook.md index 933f98c..f785117 100644 --- a/docs/operations/restore-runbook.md +++ b/docs/operations/restore-runbook.md @@ -11,7 +11,7 @@ written nightly by the `backup` sidecar onto the `backups` volume, with ## Manual restore (incident / relocation) -On the stage host, from the stage directory (`/home/DOCKER/dorfteich-/`): +On the stage host, from the stage directory (`/srv/DOCKER/dorfteich-/`): 1. **Pick the set.** `docker compose exec backup ls /backups` — usually the id in `status.json` → `lastSuccess.backupId`.