adding gitea actions
This commit is contained in:
@@ -181,7 +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`.
|
||||
- `docker-compose.yml` is the Portainer stack: one service, the `sync-data` volume, required settings enforced with `${VAR:?}`, and `stop_grace_period: 2m` so a run in progress can finish.
|
||||
- `.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`.
|
||||
- `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).
|
||||
@@ -226,6 +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
|
||||
```
|
||||
|
||||
## Open questions (resolved by spikes)
|
||||
@@ -246,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, runbook. The image was tested locally. A first Portainer deploy is still to do.
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user