customer/deploy/compose.yml
Peppa 4acc7f5ea6
All checks were successful
peppa/lint lint: success за 0с
peppa/typecheck typecheck: success за 1с
peppa/test test: success за 14с
peppa/build build: success за 1с
ci / checks (pull_request) Successful in 25s
deploy / deploy (pull_request) Successful in 3s
CLT-2: Postgres, миграции, учётные записи, сессии, CSRF, rate-limit, удаление аккаунта
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 13:24:05 +05:00

50 lines
1.9 KiB
YAML
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.

# Стенд проекта Пеппы (PEP-57). Деплой: docker compose -p <slug>-<env> -f deploy/compose.yml up -d
# с переменными IMAGE (образ peppa/<slug>:<sha>), HOST, ROUTER, APP_PORT — их задаёт
# .gitea/peppa-deploy.sh. Сервис и порт — .peppa/project.json → deploy.service / deploy.port.
# Секреты приложения — в secrets Actions репозитория, сюда только через environment.
services:
web:
image: ${IMAGE}
restart: unless-stopped
environment:
PORT: "${APP_PORT:-3000}"
# Bugsink (SDK Sentry): без SENTRY_DSN отправки нет. DSN — из secrets Actions, не из репозитория.
SENTRY_DSN: "${SENTRY_DSN:-}"
SENTRY_RELEASE: "${PEPPA_SHA:-}"
SENTRY_ENVIRONMENT: "${SENTRY_ENVIRONMENT:-dev}"
# Postgres стенда. POSTGRES_PASSWORD — из secrets Actions (запросить у PM); не из репозитория.
DATABASE_URL: "postgres://app:${POSTGRES_PASSWORD:-app}@db:5432/app"
depends_on:
db:
condition: service_healthy
networks:
- traefik_default
- default
labels:
- traefik.enable=true
- traefik.docker.network=traefik_default
- traefik.http.routers.${ROUTER}.rule=Host(`${HOST}`)
- traefik.http.routers.${ROUTER}.entrypoints=web
- traefik.http.services.${ROUTER}.loadbalancer.server.port=${APP_PORT:-3000}
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: app
POSTGRES_DB: app
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-app}"
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app -d app"]
interval: 5s
timeout: 3s
retries: 10
networks:
- default
volumes:
db-data:
networks:
traefik_default:
external: true