docs: require base image rebuilds for dependency changes

This commit is contained in:
nyan404 committed 2026-08-21 13:54:50 +03:00
1 parent 3aff50b8ac
commit 12cf6c3f60
4 files changed
+8 -3

No files matched your search

+1
View File
@@ -9,6 +9,7 @@
- Keep VK tokens and group IDs out of the repository; use environment variables or Kubernetes Secrets. - Keep VK tokens and group IDs out of the repository; use environment variables or Kubernetes Secrets.
- Production manifests are already applied in namespace `belki`; CI deploys them from `main` using the namespace-scoped RBAC in [`deploy/k8s/rbac.yaml`](./deploy/k8s/rbac.yaml). - Production manifests are already applied in namespace `belki`; CI deploys them from `main` using the namespace-scoped RBAC in [`deploy/k8s/rbac.yaml`](./deploy/k8s/rbac.yaml).
- The production build uses the GitLab runner tag `fast`, a privileged Docker executor, and an explicit `docker:29.6.1-dind` service alias over TCP. - The production build uses the GitLab runner tag `fast`, a privileged Docker executor, and an explicit `docker:29.6.1-dind` service alias over TCP.
- When adding, removing, or updating a runtime dependency, rebuild and push the matching immutable base image to `reg.nyan404.ru`, then update its tag in the final Dockerfile before running CI. `requirements.txt` maps to `Dockerfile.base`; `nginx.conf` maps to `Dockerfile.gateway-base`.
## Validation ## Validation
- For CI-only changes, prefer a targeted YAML parse and a diff review. - For CI-only changes, prefer a targeted YAML parse and a diff review.
+1
View File
@@ -23,6 +23,7 @@
- GitLab CI/CD now builds SHA/latest tags and deploys `deploy/k8s/production.yaml` from `main`. The ignored `.gitlab.variables.env` is a local handoff for GitLab Variables; CI uses namespace-scoped ServiceAccount `belki/gitlab-deploy`, not cluster-admin credentials. - GitLab CI/CD now builds SHA/latest tags and deploys `deploy/k8s/production.yaml` from `main`. The ignored `.gitlab.variables.env` is a local handoff for GitLab Variables; CI uses namespace-scoped ServiceAccount `belki/gitlab-deploy`, not cluster-admin credentials.
- 2026-08-21: applications use a separate store/table from calculator history. `/applications` and VK `/заявка` collect typed data; `/admin` accepts it. The bot can automatically notify only VK submissions, because a web form has no known reply peer. - 2026-08-21: applications use a separate store/table from calculator history. `/applications` and VK `/заявка` collect typed data; `/admin` accepts it. The bot can automatically notify only VK submissions, because a web form has no known reply peer.
- 2026-08-21: Google Sheets export is intentionally disabled by default. Application create/accept events go to a durable outbox and will be delivered through an explicitly configured Apps Script Web App endpoint once the feature flag is enabled. - 2026-08-21: Google Sheets export is intentionally disabled by default. Application create/accept events go to a durable outbox and will be delivered through an explicitly configured Apps Script Web App endpoint once the feature flag is enabled.
- 2026-08-21: CI final images use immutable registry base images. Any runtime dependency change requires rebuilding/pushing the matching base (`Dockerfile.base` for `requirements.txt`, `Dockerfile.gateway-base` for `nginx.conf`) and changing the tag used by the final Dockerfile.
# 2026-08-16 — несколько котят в прокачке # 2026-08-16 — несколько котят в прокачке
`CoachingSession.extra_kittens` теперь влияет на баллы сопровождающего через количество подопечных: 1-й ×1, 2-й ×1,5, каждый последующий ×1,15 (коэффициенты перемножаются), вместо сложения полной прибыли. Базовый коэффициент самостоятельности основного котёнка сохраняется. Веб-форма отправляет список `extra_kittens`; VK принимает `доп. котята: ...` в pipe-команде. `CoachingSession.extra_kittens` теперь влияет на баллы сопровождающего через количество подопечных: 1-й ×1, 2-й ×1,5, каждый последующий ×1,15 (коэффициенты перемножаются), вместо сложения полной прибыли. Базовый коэффициент самостоятельности основного котёнка сохраняется. Веб-форма отправляет список `extra_kittens`; VK принимает `доп. котята: ...` в pipe-команде.
+5 -2
View File
@@ -80,10 +80,13 @@
│ │ └── settings.json │ │ └── settings.json
│ │ │ │
│ ├── 📄 Конфигурация │ ├── 📄 Конфигурация
│ │ ├── Dockerfile — образ бэкенда (python:3.12-slim) │ │ ├── Dockerfile.base — immutable Python + runtime dependencies base
│ │ ├── Dockerfile.gateway — образ gateway (nginx:alpine) │ │ ├── Dockerfile — финальный образ бэкенда поверх base
│ │ ├── Dockerfile.gateway-base — immutable Nginx + nginx.conf base
│ │ ├── Dockerfile.gateway — финальный gateway поверх base
│ │ ├── nginx.conf — конфиг NGINX │ │ ├── nginx.conf — конфиг NGINX
│ │ ├── requirements.txt → psycopg[binary]==3.3.4 │ │ ├── requirements.txt → psycopg[binary]==3.3.4
│ │ │ └── изменение зависимости → пересборка и новый тег base-образа
│ │ ├── .env.example → .env (локальные переменные) │ │ ├── .env.example → .env (локальные переменные)
│ │ └── .dockerignore │ │ └── .dockerignore
│ │ │ │
+1 -1
View File
@@ -16,7 +16,7 @@
## Runtime / Deployment ## Runtime / Deployment
- GitLab CI runs the build job. - GitLab CI runs the build job.
- The job targets GitLab runner tag `fast` and builds through a privileged `docker:29.6.1-dind` service at `DOCKER_HOST=tcp://docker:2375`, with an explicit `alias: docker` and `DOCKER_TLS_CERTDIR=""`. - The job targets GitLab runner tag `fast` and builds through a privileged `docker:29.6.1-dind` service at `DOCKER_HOST=tcp://docker:2375`, with an explicit `alias: docker` and `DOCKER_TLS_CERTDIR=""`.
- Runtime dependency layers are prebuilt and stored in the private registry: `reg.nyan404.ru/cwshed-clone/belki-base:py312-d375af9a0f80` contains Python 3.12 plus the current `requirements.txt`; `reg.nyan404.ru/cwshed/cwshed-base:nginx-c2431df29ccc` contains Nginx plus `nginx.conf`. Rebuild and retag the matching base image whenever its source file changes; ordinary CI builds only copy application or static files. - Runtime dependency layers are prebuilt and stored in the private registry: `reg.nyan404.ru/cwshed-clone/belki-base:py312-d375af9a0f80` contains Python 3.12 plus the current `requirements.txt`; `reg.nyan404.ru/cwshed/cwshed-base:nginx-c2431df29ccc` contains Nginx plus `nginx.conf`. Adding, removing, or updating a runtime dependency requires rebuilding/pushing and retagging the matching base image before CI; ordinary CI builds only copy application or static files.
- The `ryzen-runner-dind` service on `root@10.3.1.168` has a valid Runner registration and its helper container can reach `https://git.nyan404.ru/`. On 2026-08-21 its malformed `DOCKER_AUTH_CONFIG` was removed and the pre-change configuration was backed up on the host as `/etc/gitlab-runner/config.toml.bak-20260821-1334`. - The `ryzen-runner-dind` service on `root@10.3.1.168` has a valid Runner registration and its helper container can reach `https://git.nyan404.ru/`. On 2026-08-21 its malformed `DOCKER_AUTH_CONFIG` was removed and the pre-change configuration was backed up on the host as `/etc/gitlab-runner/config.toml.bak-20260821-1334`.
- The Belki deploy job copies `BELKI_WEB_PASSWORD` into `Secret/belki-runtime`; if that optional CI variable is absent, it falls back to the already required `BELKI_ADMIN_PASSWORD` so the web Deployment can start. Configure `BELKI_WEB_PASSWORD` separately when a distinct web password is needed. - The Belki deploy job copies `BELKI_WEB_PASSWORD` into `Secret/belki-runtime`; if that optional CI variable is absent, it falls back to the already required `BELKI_ADMIN_PASSWORD` so the web Deployment can start. Configure `BELKI_WEB_PASSWORD` separately when a distinct web password is needed.
- The job waits for the DinD daemon and runs `docker info` before starting the build. - The job waits for the DinD daemon and runs `docker info` before starting the build.