This commit is contained in:
2026-07-14 17:53:07 +03:00
Unverified
parent d100a21020
commit 26555a6a4c
6 changed files with 172 additions and 57 deletions
+13 -13
View File
@@ -4,22 +4,22 @@ Watches GitHub **tags** and **container packages** for backend + frontend repos.
When a newer semver tag exists in both and all required `fromchat/*` images are published,
regenerates `compose.yml` (via the deployment merge script) and restarts the stack.
## Environment (`.env`)
## Environment
| Variable | Description |
|----------|-------------|
| `GITHUB_TOKEN` | PAT with `read:packages` + `repo` |
| `BACKEND_REPO` | e.g. `https://github.com/fromchat-messenger/backend.git` |
| `WEB_REPO` | e.g. `https://github.com/fromchat-messenger/web.git` |
| `DEPLOYMENT_REPO` | `https://github.com/fromchat-messenger/app.git` (deployment scripts) |
| `DEPLOYMENT_REPO` | Deployment repo for `generate-compose.py` |
| `COMPOSE_PROJECT_DIR` | Host path to the stack (`compose.yml` parent directory) |
| `FROMCHAT_COMPONENTS` | Comma list: `backend,frontend,caddy,updater` |
| `CHECK_INTERVAL_SECONDS` | Poll interval (default `60`) |
Production stack: the updater service loads **both** the main stack `.env` (secrets from `deployment/.env.prod`) and `updater/.env` (repo URLs and paths below).
Only `compose.yml` from the stack directory is mounted into the updater container (read-write at `/fromchat/compose.yml`). The current release is read from image tags inside that file.
| Variable | Where | Description |
|----------|-------|-------------|
| `UPDATER_TOKEN` | main `.env` | PAT with `read:packages` + `repo` (GitHub or Gitea) |
| `BACKEND_REPO` | `updater/.env` | e.g. `https://github.com/fromchat-messenger/backend.git` |
| `WEB_REPO` | `updater/.env` | e.g. `https://github.com/fromchat-messenger/web.git` |
| `DEPLOYMENT_REPO` | `updater/.env` | Deployment repo for `generate-compose.py` |
| `COMPOSE_PROJECT_DIR` | `updater/.env` | Host path to the stack (`compose.yml` parent directory) |
| `FROMCHAT_COMPONENTS` | `updater/.env` | Comma list: `backend,frontend,caddy,updater` |
| `CHECK_INTERVAL_SECONDS` | `updater/.env` | Poll interval (default `60`) |
| `GITEA_BASE` | optional | Override Gitea API base (e.g. `http://host.docker.internal:3000`). If unset, probes host-gateway `:3000` then `https://git.fromchat.ru`. |
Create token: [GitHub PAT (read:packages + repo)](https://github.com/settings/tokens/new?description=FromChat%20Updater&scopes=read:packages,repo)
Create token: [GitHub PAT (read:packages + repo)](https://github.com/settings/tokens/new?description=FromChat%20Updater&scopes=read:packages,repo) — set as `UPDATER_TOKEN` in `deployment/.env.prod` (deploy copies it to the server main `.env`).
## Run standalone