gendesign/tradein-mvp/deploy/Caddyfile
lekss361 02267d0306 feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in)
- FastAPI backend: PostGIS estimator + 3 scrapers (Avito/Cian/Yandex)
- Next.js 15 frontend: tradein.html mockup design, basePath=/trade-in
- WeasyPrint PDF (Брусника-style 4-page report)
- Address autocomplete с typo-tolerance + 6 EKB presets
- Изолированный docker stack gendesign-tradein (отдельная postgres БД)
- Caddy inline routes: gendsgn.ru/trade-in/* и /trade-in/api/v1/*
- Forgejo Actions: .forgejo/workflows/deploy-tradein.yml (shell-based GHCR login)
- Триггер только по paths: tradein-mvp/** (не пересекается с deploy.yml)
- Образы: ghcr.io/lekss361/gendesign-tradein-{backend,frontend}:latest

Первый запуск на сервере (вручную, один раз):
  - создать /opt/gendesign/tradein-mvp/.env.runtime (postgres pwd, contact email)
  - docker network create gendesign_shared (если нет)
  - docker compose -p gendesign-tradein up -d
  - docker compose -p gendesign exec caddy caddy reload
2026-05-21 00:25:39 +03:00

29 lines
775 B
Caddyfile
Raw Permalink 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.

# Local Caddyfile — без TLS, всё на http://localhost:8080
#
# Структура зеркалит прод gendesign:
# - /api/* → backend FastAPI (порт 8000)
# - /health → backend health
# - /preview/* → статические HTML mockups (включая tradein.html)
# - / → frontend Next.js (порт 3000)
:80 {
encode zstd gzip
handle /api/* {
reverse_proxy backend:8000
}
handle /health {
reverse_proxy backend:8000
}
# tradein.html mockup для side-by-side сравнения с реальной /trade-in страницей.
handle_path /preview/* {
root * /srv/preview
file_server browse
}
handle {
reverse_proxy frontend:3000
}
}