just going to build and push locally instead of gitea actions

This commit is contained in:
C-West8
2026-10-23 09:47:55 -05:00
parent 3d8b453428
commit 3617c1dc95
8 changed files with 120 additions and 126 deletions

View File

@@ -181,8 +181,8 @@ Two settings live outside `src/env.ts`:
### Deployment
- `Dockerfile`: a multi-stage build on `node:24-bookworm-slim`. The runtime stage holds `build/`, production `node_modules` (`better-sqlite3`, `zod`; everything else is bundled) and `drizzle/`, runs as `node`, and keeps the database at `/data/sync.db`.
- `.gitea/workflows/ci.yml`: every pull request and push to main runs lint, type check, tests and build. On main, a second job that needs the first builds the image and pushes it to the Gitea registry, tagged `latest` and with the short commit hash, then calls the Portainer webhook if one is set. Since CI builds the image, `ORIGIN` is a Gitea Actions variable.
- `docker-compose.yml` is the Portainer stack: one service using the CI image with `pull_policy: always` (a redeploy never reuses a stale image, and `IMAGE` pins a commit tag for rollback), the `sync-data` volume, required settings enforced with `${VAR:?}`, and `stop_grace_period: 2m` so a run in progress can finish. Its `build:` section is for local `docker compose up --build`.
- No CI: images are built on a developer's machine with `npm run image:publish` (`scripts/publish-image.ts`). It refuses uncommitted changes, runs lint, type check and tests, builds, and pushes to the Gitea registry tagged with the short commit hash and then `latest`. It reads `ORIGIN` from the shell, never from `.env`. Portainer only pulls and runs the image.
- `docker-compose.yml` is the Portainer stack: one service using the published image with `pull_policy: always` (a redeploy never reuses a stale image, and `IMAGE` pins a commit tag for rollback), the `sync-data` volume, required settings enforced with `${VAR:?}`, and `stop_grace_period: 2m` so a run in progress can finish. Its `build:` section is for local `docker compose up --build`.
- `GET /healthz` backs the image's `HEALTHCHECK`.
- On startup, runs left without an outcome (the process was killed mid-run) are closed as failed. The next run carries on from the saved item state.
- Operations are covered in [runbook.md](runbook.md).
@@ -227,7 +227,7 @@ src/lib/styles/app.css # design tokens + shared styles
src/routes/ # projects, project status + history, admin, healthz
drizzle/ # generated SQL migrations (npm run db:generate)
Dockerfile docker-compose.yml
.gitea/workflows/ci.yml # tests on PRs and main; image build + push on main
scripts/publish-image.ts # checks, builds and pushes the image (npm run image:publish)
```
## Open questions (resolved by spikes)
@@ -248,4 +248,4 @@ Dockerfile docker-compose.yml
6. **ApsDocumentTarget** + ACC folder URL resolver, including the fallbacks chosen in step 1.
7. **Wiring (done):** coordinator, scheduler, composition root, `init` hook, history pruning, simulated mode.
8. **UI (done):** projects list, project status (title block, issues with retry, file tree), 7-day history with per-run detail, Run now with cooldown, admin login, add/edit/resume/reset/remove.
9. **Ship (done):** Docker image, Portainer stack file, Gitea Actions CI, runbook. The image was tested locally. The first CI run and Portainer deploy are still to do.
9. **Ship (done):** Docker image, Portainer stack file, publish script, runbook. The image was tested locally. The first publish and Portainer deploy are still to do.