Добавить статичный Docker-деплой
Build and deploy / deploy (push) Has been cancelled

This commit is contained in:
2026-05-17 22:35:08 +03:00
parent dcdc040918
commit fc603f9579
7 changed files with 219 additions and 1 deletions
+37
View File
@@ -18,3 +18,40 @@ node scripts/buildDatabase.mjs
npm run dev -- --port 3000
npm run build
```
Docker static deploy:
```bash
docker build -t progcode:static .
docker run --rm -p 8080:8080 progcode:static
```
Swarm example:
```bash
DOMAIN=progcode.example.com IMAGE=registry.example.com/progcode:static \
docker stack deploy -c deploy/stack.example.yml progcode
```
Gitea Actions variables:
- `DOMAIN` — public host routed by Traefik.
- `IMAGE` — full image tag to build and deploy, for example `registry.example.com/progcode:latest`.
- `IMAGE_REPO` — optional alternative to `IMAGE`; the workflow will tag images as `${IMAGE_REPO}:${short_sha}`.
- `REGISTRY` — registry host for `docker login`.
- `STACK_NAME` — optional, defaults to `progcode`.
- `TRAEFIK_NETWORK` — optional, defaults to `traefik-public`.
- `TRAEFIK_ENTRYPOINT` — optional, defaults to `websecure`.
- `PUSH_LATEST` — optional, set to `true` to also push `${IMAGE_REPO}:latest`.
Gitea Actions secrets:
- `REGISTRY_USER`
- `REGISTRY_PASSWORD`
- `DEPLOY_SSH_KEY` — only when deploying to a remote Swarm manager over SSH.
Remote Swarm deploy variables:
- `DEPLOY_HOST`
- `DEPLOY_USER`
- `DEPLOY_PORT` — optional, defaults to `22`.