From fa610dfebcd96ed53dd696f99b507f0b207b39ed Mon Sep 17 00:00:00 2001 From: Silberengel Date: Wed, 27 May 2026 17:16:30 +0200 Subject: [PATCH] update readme --- README.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c667f42..9e63245 100644 --- a/README.md +++ b/README.md @@ -127,33 +127,31 @@ For a full **Nostr backfill** + one-shot prewarm, use **`make prewarm`** (or a h ## Production / Hub (remote server) -The app runs as a **pre-built** image (no app source on the server). The server only needs `compose.hub.yaml`, a `.env`, and Docker. Default image: `silberengel/unfold:latest`; override with **`UNFOLD_DOCKER_IMAGE`**. +The app runs as a **pre-built** image (no app source on the server). The server only needs `compose.hub.yaml`, a `.env`, and Docker. Default image: **`silberengel/unfold:gitcitadel`** (GitCitadel site on the **`gitcitadel`** branch); override with **`UNFOLD_DOCKER_IMAGE`**. | Topic | Notes | |-------|--------| -| `compose.hub.yaml` | Defines **`php`** (FrankenPHP) + **`database`** (MySQL) + **`prewarm`** (same app image: **`app:prewarm` every 10 minutes**, like dev’s `docker/cron`). Optional: disable `prewarm` in Compose if you prefer a host `cron` only. | -| HTTP | **`HTTP_PUBLISH`** in `.env` maps **host** port → container **80** (default **9080**). Put a reverse proxy (e.g. Apache) in front; set **`TRUSTED_PROXIES`** to match your proxy (often include `127.0.0.0/8` and the Docker bridge CIDR, e.g. `172.16.0.0/12`). | +| `compose.hub.yaml` | Compose project **`gitcitadel`** (containers e.g. `gitcitadel-php-1`). Defines **`php`** (FrankenPHP) + **`database`** (MySQL) + **`prewarm`** (same app image: **`app:prewarm` every 10 minutes**, like dev’s `docker/cron`). Optional: disable `prewarm` in Compose if you prefer a host `cron` only. | +| HTTP | **`HTTP_PUBLISH`** in `.env` maps **host** port → container **80** (default **`127.0.0.1:9085`** for `gitcitadel.imwald.eu`). Put a reverse proxy (e.g. Apache) in front; set **`TRUSTED_PROXIES`** to match your proxy (often include `127.0.0.0/8` and the Docker bridge CIDR, e.g. `172.16.0.0/12`). | | Secrets | Real **`APP_SECRET`** and **`MYSQL_*`** (or external DB via `DATABASE_URL` if you change the file). Do not commit production `.env`. | | `PREWARM_FLAGS` | Optional extra CLI args for the hub **`prewarm`** service (and dev **`cron`**). After editing `.env`, run `docker compose -f compose.hub.yaml up -d --force-recreate prewarm`. | ### Build, tag, and push (on your machine or CI) -From the **repository root** (same `Dockerfile` as local prod): +From the **repository root** on the **`gitcitadel`** branch (same `Dockerfile` as local prod): ```bash -# Production image -docker build --platform linux/amd64 --target frankenphp_prod -t YOUR_REGISTRY/unfold:latest . +# GitCitadel hub image (default in compose.hub.yaml) +docker build --platform linux/amd64 --target frankenphp_prod -t silberengel/unfold:gitcitadel . +docker push silberengel/unfold:gitcitadel -# Optional: immutable tag for rollbacks -docker build --platform linux/amd64 --target frankenphp_prod -t YOUR_REGISTRY/unfold:1.0.0 . - -# Push what you use on the server -docker push YOUR_REGISTRY/unfold:latest -docker push YOUR_REGISTRY/unfold:1.0.0 +# Optional: immutable tag for rollbacks (set UNFOLD_DOCKER_IMAGE on the server to match) +docker build --platform linux/amd64 --target frankenphp_prod -t silberengel/unfold:1.0.0 . +docker push silberengel/unfold:1.0.0 ``` - Use **`linux/amd64`** if the server is amd64; use **`arm64`** (or a matching `--platform`) for arm servers. -- The image name must match what the server will pull: either keep **`UNFOLD_DOCKER_IMAGE=YOUR_REGISTRY/unfold:TAG`** in server `.env`, or push to the default name **`silberengel/unfold:latest`**. +- The image tag must match what the server pulls: push to **`silberengel/unfold:gitcitadel`**, or set **`UNFOLD_DOCKER_IMAGE=YOUR_REGISTRY/unfold:TAG`** in server `.env`. ### Deploy on the server (pull, up, migrate) @@ -185,7 +183,7 @@ make -f Makefile.hub backfill # up + migrate + articles-get + prewarm-onc **Optional image / tag** (in `.env` or one-shot): ```bash -export UNFOLD_DOCKER_IMAGE=YOUR_REGISTRY/unfold:1.0.0 +export UNFOLD_DOCKER_IMAGE=silberengel/unfold:1.0.0 docker compose -f compose.hub.yaml up -d ```