foxy-dev-team/docker-compose.yml

66 lines
2.4 KiB
YAML

# ═══════════════════════════════════════════════════════════════════════════════
# 🦊 Foxy Dev Team — Docker Compose
# ═══════════════════════════════════════════════════════════════════════════════
# Complete stack: API backend + Telegram bot
#
# Usage:
# docker compose up -d # Start all services
# docker compose up -d --build # Rebuild and start
# docker compose logs -f # Follow logs
# docker compose down # Stop all services
# ═══════════════════════════════════════════════════════════════════════════════
services:
# ─── Foxy API (Backend + Frontend) ──────────────────────────────────────────
foxy-api:
build:
context: .
dockerfile: Dockerfile
container_name: foxy-api
restart: unless-stopped
ports:
- "${API_PORT:-8000}:8000"
env_file:
- backend/.env
volumes:
- foxy-data:/app/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
networks:
- foxy-net
labels:
- "com.foxy.service=api"
- "com.foxy.version=2.0.0"
# ─── Foxy Telegram Bot ─────────────────────────────────────────────────────
foxy-telegram:
build:
context: .
dockerfile: Dockerfile.telegram
container_name: foxy-telegram
restart: unless-stopped
env_file:
- backend/.env
environment:
- FOXY_API_URL=http://foxy-api:8000
depends_on:
foxy-api:
condition: service_healthy
networks:
- foxy-net
labels:
- "com.foxy.service=telegram-bot"
- "com.foxy.version=2.0.0"
volumes:
foxy-data:
driver: local
networks:
foxy-net:
driver: bridge