fix(tradein/devops): wire COOKIE_ENCRYPTION_KEY env to tradein-backend #543
2 changed files with 21 additions and 0 deletions
|
|
@ -56,10 +56,27 @@ TRADEIN_POSTGRES_USER=tradein
|
|||
TRADEIN_POSTGRES_PASSWORD=<сгенерировать openssl rand -hex 32>
|
||||
TRADEIN_CONTACT_EMAIL=tradein@gendsgn.ru
|
||||
YANDEX_GEOCODER_KEY= # пусто пока, Nominatim fallback работает
|
||||
|
||||
# Encryption key for Cian session cookies (pgp_sym_encrypt / Stage 9 Calculator).
|
||||
# Empty = Valuation Calculator scraper disabled + /api/v1/cookies/upload returns 503.
|
||||
# Generate once on VPS:
|
||||
# openssl rand -hex 32
|
||||
COOKIE_ENCRYPTION_KEY=<64-char hex>
|
||||
```
|
||||
|
||||
Файл создаётся вручную при первом деплое.
|
||||
|
||||
### Обновление `COOKIE_ENCRYPTION_KEY` на существующем VPS
|
||||
|
||||
```bash
|
||||
# На VPS, если COOKIE_ENCRYPTION_KEY ещё не задан:
|
||||
echo "COOKIE_ENCRYPTION_KEY=$(openssl rand -hex 32)" >> /opt/gendesign/tradein-mvp/.env.runtime
|
||||
|
||||
# Применить без полного рестарта стека:
|
||||
cd /opt/gendesign/tradein-mvp
|
||||
docker compose -p gendesign-tradein -f docker-compose.prod.yml up -d --force-recreate --no-deps backend
|
||||
```
|
||||
|
||||
## GitHub Secrets (уже должны быть от gendesign deploy)
|
||||
|
||||
- `DEPLOY_HOST` — IP сервера (94.228.121.73)
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ services:
|
|||
# GlitchTip DSN — мониторинг ошибок (#396). Пусто = выключено.
|
||||
GLITCHTIP_DSN: "${GLITCHTIP_DSN:-}"
|
||||
GENDESIGN_FDW_PASSWORD: "${GENDESIGN_FDW_PASSWORD:-}"
|
||||
# Encryption key for Cian session cookies (pgp_sym_encrypt). Required for
|
||||
# Valuation Calculator (Stage 9). Empty = Calculator scraper disabled +
|
||||
# cookies upload endpoint returns 503. Generate with `openssl rand -hex 32`.
|
||||
COOKIE_ENCRYPTION_KEY: "${COOKIE_ENCRYPTION_KEY:-}"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue