food-market/src/food-market.public/.env.example
nns 4296236206
Some checks are pending
Auto-tag / Create date-tag (push) Waiting to run
CI / Backend (.NET 8) (push) Waiting to run
CI / Web (React + Vite) (push) Waiting to run
CI / POS (WPF, Windows) (push) Waiting to run
Docker Public / Build + push Public (test + latest) (push) Waiting to run
Docker Public / Deploy :test → test.food-market.kz (push) Blocked by required conditions
feat(public): :test ↔ test.admin, :latest ↔ admin; HTTPS-safe redirects
Workflow (.forgejo/workflows/docker-public.yml):
- Собирает ДВА тега: :test с PUBLIC_APP_URL=https://test.admin.food-market.kz
  (для test.food-market.kz) и :latest с PUBLIC_APP_URL=https://admin.food-
  market.kz (для будущего food-market.kz). deploy_prod отключён
  намеренно: прод-public закрыт владельцем.
- deploy_test: SSH на prod-vm, идемпотентно устанавливает PUBLIC_TAG=test
  в ~/food-market/deploy/.env, pull + up -d public. Smoke проверяет что
  /signup/ ссылается на test.admin и НЕ содержит admin.food-market.kz.

nginx.conf (src/food-market.public/deploy/):
- absolute_redirect off; port_in_redirect off;
  Было: curl -sI https://test.food-market.kz/signup → location: http://...
  (schema терялась на 301 /signup → /signup/).
  Стало: location: /signup/ (относительный, браузер держит https).

Env-пример (.env.example) — комментарий, что для test-билда ставить
test.admin и прод в коде оставить дефолтом в source-коде (SignupForm/
Header), но в билде всегда задавать явно через PUBLIC_APP_URL build-arg.

RUNBOOK — новый раздел «Публичный сайт: какой образ ↔ какой домен» с
таблицей и smoke-командой.

Smoke проверил:
- https://test.food-market.kz/signup → 301 на /signup/ (без схемы, https
  сохраняется).
- https://test.food-market.kz/signup/ → ссылается на test.admin.food-
  market.kz; ни одного вхождения admin.food-market.kz (без test.).
- POST /api/auth/signup с Origin test.food-market.kz → user создан в
  food-market-stage-postgres-1 (STAGE), не в food-market-postgres (прод-
  adjacent).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-10-04 17:14:55 +05:00

9 lines
593 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Публичный URL самого сайта (canonical, OG, sitemap)
PUBLIC_SITE_URL=https://test.food-market.kz
# Админка / API — куда уходит юзер после signup, и куда шлются POST /api/auth/signup.
# ⚠ Для test-сборки (образ food-market-public:test) → https://test.admin.food-market.kz
# Для прод-сборки (:latest) → https://admin.food-market.kz
# Workflow docker-public.yml собирает оба тега с соответствующими значениями.
PUBLIC_APP_URL=https://test.admin.food-market.kz