chore: drop parallel-run setup, document direct rollout and rollback
The UI goes live on the main domain directly, so the second-instance compose file and the AUTO_RULE_SYNC_DISABLED switch are not needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
affa046b4a
commit
c40ccf77cf
5 files changed
+21
-128
No files matched your search
+21
-52
@@ -36,7 +36,6 @@ All production configuration is provided via environment variables (e.g. `.env`
|
||||
| `LEGAL_TERMS_URL` | Public Nutzungsbedingungen link | `https://leon-tonhaeuser.de/agb` |
|
||||
| `AUTO_RULE_SYNC_INTERVAL_SECONDS` | Interval of the album auto-rule sync in seconds (min 30) | `120` (default) |
|
||||
| `CRON_SECRET` | Optional bearer token for `POST /api/cron/album-sync`; unset disables the endpoint | `openssl rand -hex 32` |
|
||||
| `AUTO_RULE_SYNC_DISABLED` | `true` skips the in-process album auto-rule sync (for a second instance on the same DB, see §8) | unset (sync runs) |
|
||||
|
||||
---
|
||||
|
||||
@@ -143,62 +142,32 @@ docker compose start portal-app
|
||||
|
||||
---
|
||||
|
||||
## 8. Parallel Run of the New UI (Sakani) and Cutover
|
||||
## 8. Rolling Out a New App Version (e.g. the Sakani UI, v2.0)
|
||||
|
||||
The Sakani redesign can run next to the live portal on its own subdomain, against
|
||||
the **same database and Immich**, until it is accepted. The branch contains no
|
||||
database migrations, so both versions work on the same schema.
|
||||
UI releases such as v2.0 change no database schema; the app keeps using the
|
||||
existing `portal-db`, so all editorials, grants, usages, billing reports and
|
||||
announcements carry over unchanged.
|
||||
|
||||
**What "parallel" means in practice**
|
||||
|
||||
- Every action in the new UI is real: approvals, album grants, downloads, usages,
|
||||
billing reports and announcements land in the production database.
|
||||
- Sessions are per domain: users log in separately on the new subdomain.
|
||||
- E-mails sent by the parallel instance (verification, password reset, album
|
||||
notifications) link to the new subdomain (`PARALLEL_BASE_URL`).
|
||||
- Only the live instance runs the album auto-rule sync and the cron endpoint; the
|
||||
parallel one has `AUTO_RULE_SYNC_DISABLED=true` and no `CRON_SECRET`.
|
||||
|
||||
**Start the parallel instance** (on the server, next to the live checkout):
|
||||
|
||||
1. Push the branch, then check it out beside the live checkout:
|
||||
1. Back up the database (see §6):
|
||||
```bash
|
||||
git fetch origin && git worktree add ../portal-sakani origin/<sakani-branch>
|
||||
scripts/backup-db.sh /var/backups/immich-portal
|
||||
```
|
||||
2. Build its image:
|
||||
2. Note the running commit for a rollback: `git rev-parse HEAD`.
|
||||
3. Update and rebuild:
|
||||
```bash
|
||||
docker build -t portal-app:sakani ../portal-sakani
|
||||
git pull
|
||||
docker compose build portal-app
|
||||
docker compose --profile ops run --rm migrate # no-op when there are no new migrations
|
||||
docker compose up -d portal-app
|
||||
```
|
||||
3. In the live `.env`, add the public URL of the new subdomain:
|
||||
```bash
|
||||
PARALLEL_BASE_URL=https://neu.redaktionen.leon-tonhaeuser.de
|
||||
```
|
||||
4. Start it from the **live** checkout (so it joins the live networks and DB):
|
||||
```bash
|
||||
docker compose -f compose.yaml -f ../portal-sakani/compose.parallel.yaml up -d portal-app-next
|
||||
```
|
||||
5. DNS: point the subdomain at the server. Reverse proxy (Zoraxy): add a rule
|
||||
`neu.redaktionen…` → `localhost:3001` with the same settings as the live rule
|
||||
(no buffering for `/api/downloads/`, `X-Forwarded-For` as described in §3).
|
||||
6. Smoke test: `GET https://<subdomain>/api/health/ready` → 200, then log in as
|
||||
admin and as an editorial account.
|
||||
4. Verify: `GET /api/health/ready` → 200, then log in as admin and as an
|
||||
editorial account.
|
||||
|
||||
**Update the parallel instance** after new commits on the branch:
|
||||
`git -C ../portal-sakani pull`, rebuild the image (step 2), re-run step 4.
|
||||
|
||||
**Roll back** at any time: stop only the parallel container — the live portal is
|
||||
untouched.
|
||||
```bash
|
||||
docker compose -f compose.yaml -f ../portal-sakani/compose.parallel.yaml rm -sf portal-app-next
|
||||
```
|
||||
|
||||
**Cutover** (the new UI replaces the old one on the main domain):
|
||||
|
||||
1. Merge the Sakani branch into `main`.
|
||||
2. In the live checkout: `git pull`, then
|
||||
`docker compose build portal-app && docker compose up -d portal-app`.
|
||||
(`BETTER_AUTH_URL` stays the main domain; no other env changes are needed.)
|
||||
3. Stop the parallel container (rollback command above), remove the Zoraxy rule
|
||||
or turn it into a redirect to the main domain, delete `PARALLEL_BASE_URL` from
|
||||
`.env`, and `git worktree remove ../portal-sakani`.
|
||||
**Rollback**: check out the noted commit (`git checkout <commit>`), then
|
||||
`docker compose build portal-app && docker compose up -d portal-app`, and
|
||||
return to `main` with `git checkout main` afterwards. A UI-only release needs no
|
||||
database restore.
|
||||
|
||||
**Release notes popup**: users see "Was ist neu?" once per version after
|
||||
signing in. For the next release, bump `RELEASE.version` and replace the notes
|
||||
in `src/components/layout/release-notes.tsx`.
|
||||
Reference in new issue
Block a user