From 3b9cf0ee9a0a8fcffdb6b818466364c64f27d298 Mon Sep 17 00:00:00 2001 From: nurdotnet <278048682+nurdotnet@users.noreply.github.com> Date: Wed, 22 Apr 2026 20:14:00 +0500 Subject: [PATCH] =?UTF-8?q?docs(stage):=20how=20to=20expose=20stage=20exte?= =?UTF-8?q?rnally=20=E2=80=94=20DNS=20+=20cerbot=20vs=20proxmox=20port?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stage deploy lands the api+web containers fine (last deploy succeeded), but external 8080/8081 are blocked at the Proxmox/provider firewall (verified: ufw on the VM is inactive, so the block is upstream). Added /etc/nginx/conf.d/food-market-stage.conf on the server: vhost on port 80 (which IS open) for server_name food-market-stage.space-time.kz proxying to 127.0.0.1:8081. Once a DNS A-record is added, certbot can issue Let's Encrypt — same pattern the existing food-market-server uses. docs/stage-access.md — runbook with the three options (DNS subdomain, open Proxmox port, SSH tunnel for quick test). Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/stage-access.md | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 docs/stage-access.md diff --git a/docs/stage-access.md b/docs/stage-access.md new file mode 100644 index 0000000..38ad671 --- /dev/null +++ b/docs/stage-access.md @@ -0,0 +1,59 @@ +# Доступ к stage food-market.space-time.kz + +## Текущая ситуация + +- **Stage запущен** на `88.204.171.93` через docker compose в `~/food-market-stage/deploy/` +- **Порты внутри:** API 8080, Web 8081, Postgres 5434 (localhost) +- **Внешний доступ к 8080/8081 заблокирован** на уровне Proxmox/провайдера +- **Открыты снаружи:** 80, 443 (для существующих сайтов через nginx) + +## Что уже настроено + +В `/etc/nginx/conf.d/food-market-stage.conf` добавлен vhost: + +``` +server { + listen 80; + server_name food-market-stage.space-time.kz; + location / { proxy_pass http://127.0.0.1:8081; ... } +} +``` + +## Что нужно сделать (одноразово) + +### 1. Поднять DNS A-запись + +В DNS-провайдере зоны `space-time.kz` (Cloudflare?) добавить: +``` +food-market-stage.space-time.kz A 88.204.171.93 TTL 300 +``` + +### 2. Выпустить SSL через certbot + +После того как DNS прописан и распространился (5-10 мин): +```bash +ssh -p 9393 nns@88.204.171.93 'sudo certbot --nginx -d food-market-stage.space-time.kz --non-interactive --agree-tos -m admin@space-time.kz' +``` + +После этого: https://food-market-stage.space-time.kz — рабочая stage-админка. + +## Альтернатива — открыть порт в Proxmox + +Если не хочется заводить subdomain, можно просто открыть `8081` в Proxmox firewall: +- Проверить: что-то типа Datacenter → Firewall → Add Rule (если firewall на уровне DC) +- Или Node → Firewall → Add Rule (если на уровне VM) +- Action: Accept, Direction: in, Protocol: tcp, Dest port: 8081 + +Тогда работать будет на http://88.204.171.93:8081 (но без HTTPS). + +## Тест без DNS — SSH-туннель + +С Mac/iPhone (через Termius): +```bash +ssh -L 8081:localhost:8081 -p 9393 nns@88.204.171.93 +``` +Открыть в браузере http://localhost:8081 — пойдёт через тоннель. + +## Когда запустится Claude на сервере + +Я завершу всю эту настройку (включая DNS если ты дашь доступ к Cloudflare) и пришлю Telegram «Stage live: https://...».