From 8e4522d211b723960c30dd2b10d886651e0e1a43 Mon Sep 17 00:00:00 2001 From: Nyan404 Date: Tue, 8 Sep 2026 23:32:42 +0300 Subject: [PATCH] docs: record private MinIO image delivery --- MEMORY.md | 2 +- project_mind_map.md | 2 +- structure_and_data.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MEMORY.md b/MEMORY.md index e4a1519..17fc217 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -77,4 +77,4 @@ The final gateway Dockerfile must copy `nginx.conf` into the release image, not # 2026-09-08: private MinIO image storage -`app/belki/image_host.py` now uses private distributed MinIO rather than `nyan.nyan404.ru`. The five internal S3 endpoints are tried in order for each operation; uploads are stored under an unguessable 128-bit object ID and public URLs resolve only through `https://cat.nyan404.ru/api/images/`. Keep the MinIO bucket private. `belki-image-store` is a standalone out-of-band Secret with only `GetObject`/`PutObject` for `belki-images`; never merge it into CI-recreated `belki-runtime` or commit credentials. Existing legacy img.nyan404.ru URLs remain stored as historical links and cannot be recovered by this change. +`app/belki/image_host.py` now uses private distributed MinIO rather than `nyan.nyan404.ru`. The five internal S3 endpoints are tried in order for each operation; uploads are stored under an unguessable 128-bit object ID and public URLs resolve only through `https://cat.nyan404.ru/api/images/`. Keep the MinIO bucket private. `belki-image-store` is a standalone out-of-band Secret with only `GetObject`/`PutObject` plus required `GetBucketLocation` for `belki-images`; never merge it into CI-recreated `belki-runtime` or commit credentials. Existing legacy img.nyan404.ru URLs remain stored as historical links and cannot be recovered by this change. diff --git a/project_mind_map.md b/project_mind_map.md index 860dff7..49f9a39 100644 --- a/project_mind_map.md +++ b/project_mind_map.md @@ -69,7 +69,7 @@ mindmap Private MinIO image storage belki-images bucket five internal S3 endpoints - bucket-scoped GetObject PutObject account + bucket-scoped GetObject PutObject GetBucketLocation account public proxy /api/images/id Integrations VK API diff --git a/structure_and_data.md b/structure_and_data.md index 0c85fa7..e501cd8 100644 --- a/structure_and_data.md +++ b/structure_and_data.md @@ -20,7 +20,7 @@ - [`CONTRIBUTING.md`](./CONTRIBUTING.md): contribution and verification rules. ## Runtime / Deployment -- 2026-09-08: report screenshots and VK attachment mirrors use private distributed MinIO through the `minio==7.2.20` SDK. `belki-image-store` is a separate, out-of-band Kubernetes Secret containing the five internal endpoints, a bucket-scoped `GetObject`/`PutObject` account, and `belki-images`; it is deliberately separate from CI-managed `belki-runtime` so normal deploys cannot remove it. `belki-web` and `belki-bot` return/retain `https://cat.nyan404.ru/api/images/<128-bit-random-id>.` while `Handler` proxies reads from MinIO. MinIO has no public exposure. +- 2026-09-08: report screenshots and VK attachment mirrors use private distributed MinIO through the `minio==7.2.20` SDK. `belki-image-store` is a separate, out-of-band Kubernetes Secret containing the five internal endpoints, a bucket-scoped `GetObject`/`PutObject` account plus required `GetBucketLocation`, and `belki-images`; it is deliberately separate from CI-managed `belki-runtime` so normal deploys cannot remove it. `belki-web` and `belki-bot` return/retain `https://cat.nyan404.ru/api/images/<128-bit-random-id>.` while `Handler` proxies reads from MinIO. MinIO has no public exposure. - `Dockerfile.base` is rebuilt and pushed with the immutable `py312-` tag before the final Belki image; `Dockerfile` accepts that base through `BELKI_BASE_IMAGE`, leaving only application sources in the final layer. - GitLab CI runs the build job. - Production container architecture is explicitly `linux/amd64`: CI sets `DOCKER_DEFAULT_PLATFORM` and passes `--platform linux/amd64`, Dockerfiles pin the platform, and Kubernetes workloads select nodes labeled `kubernetes.io/arch: amd64`. The former private Python base tag was arm64-only and is no longer used by the application image.