zov-tech/deploy/docker-compose.staging.yml
wasrusgen ea04e042df feat: staging-окружение (Docker Compose + Caddy + deploy-script)
docker-compose.staging.yml — backend-staging на порту 8001.
.env.staging.example — шаблон с отдельным SHEET_ID.
Caddyfile.staging.snippet — staging.api.wasrusgen1.pro.
scripts/deploy-staging.sh — один скрипт для деплоя staging.
app.js: BACKEND_URL читается из ?backend= параметра URL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 14:22:01 +03:00

42 lines
1.2 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.

# Staging-окружение — только backend, без бота и тоннеля.
# Использует отдельный .env.staging с тестовым SHEET_ID.
#
# Запуск:
# docker compose -f docker-compose.staging.yml --env-file .env.staging up -d --build
# Остановка:
# docker compose -f docker-compose.staging.yml down
services:
backend-staging:
build:
context: ../backend-py
dockerfile: Dockerfile
image: zov-tech-backend:staging
container_name: zov-backend-staging
restart: unless-stopped
env_file:
- .env.staging
environment:
- STAGING=true
volumes:
- ./credentials.json:/app/credentials.json:ro
- ./photos-staging:/app/photos
networks:
- web
- internal-staging
ports:
- "127.0.0.1:8001:8000"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request,sys; r=urllib.request.urlopen('http://127.0.0.1:8000/healthz', timeout=3); sys.exit(0 if r.status==200 else 1)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
networks:
web:
name: deploy_web
external: true
internal-staging:
driver: bridge