diff --git a/Dockerfile b/Dockerfile index 06ecf1f..3b98dfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,5 @@ -FROM python:3.12-slim +FROM reg.nyan404.ru/cwshed-clone/belki-base:py312-d375af9a0f80 -ENV PYTHONDONTWRITEBYTECODE=1 \ - PYTHONUNBUFFERED=1 \ - LANG=C.UTF-8 \ - LC_ALL=C.UTF-8 - -WORKDIR /app -COPY requirements.txt ./requirements.txt -RUN pip install --no-cache-dir -r requirements.txt COPY app ./app COPY web ./web diff --git a/Dockerfile.base b/Dockerfile.base new file mode 100644 index 0000000..6739a65 --- /dev/null +++ b/Dockerfile.base @@ -0,0 +1,10 @@ +FROM python:3.12-slim + +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 \ + LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 + +WORKDIR /app +COPY requirements.txt ./requirements.txt +RUN pip install --no-cache-dir -r requirements.txt diff --git a/Dockerfile.gateway b/Dockerfile.gateway index ed852c7..c34c16b 100644 --- a/Dockerfile.gateway +++ b/Dockerfile.gateway @@ -1,10 +1,6 @@ -FROM nginx:alpine - -ENV LANG=C.UTF-8 \ - LC_ALL=C.UTF-8 +FROM reg.nyan404.ru/cwshed/cwshed-base:nginx-c2431df29ccc COPY web /usr/share/nginx/html -COPY nginx.conf /etc/nginx/nginx.conf RUN chmod -R 755 /usr/share/nginx/html \ && chown -R nginx:nginx /usr/share/nginx/html diff --git a/Dockerfile.gateway-base b/Dockerfile.gateway-base new file mode 100644 index 0000000..cab8d09 --- /dev/null +++ b/Dockerfile.gateway-base @@ -0,0 +1,6 @@ +FROM nginx:alpine + +ENV LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 + +COPY nginx.conf /etc/nginx/nginx.conf diff --git a/structure_and_data.md b/structure_and_data.md index 8d3f39b..fe29ad7 100644 --- a/structure_and_data.md +++ b/structure_and_data.md @@ -16,6 +16,7 @@ ## Runtime / Deployment - 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=""`. +- 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. - 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 verifies and copies `BELKI_WEB_PASSWORD` into `Secret/belki-runtime`; the web Deployment requires that key and cannot start without it. - The job waits for the DinD daemon and runs `docker info` before starting the build.