services: frontend: build: ./frontend ports: - "3000:3000" volumes: - ./frontend:/app - /app/node_modules - /app/.next environment: NEXT_PUBLIC_API_URL: http://backend:8000 depends_on: - backend db: image: postgres:16-alpine environment: POSTGRES_USER: terpadvisor POSTGRES_PASSWORD: terpadvisor_dev POSTGRES_DB: terpadvisor ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U terpadvisor"] interval: 5s timeout: 3s retries: 5 redis: image: redis:7-alpine ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 backend: build: ./backend command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload ports: - "8000:8000" volumes: - ./backend:/app environment: DATABASE_URL: postgresql+asyncpg://terpadvisor:terpadvisor_dev@db:5432/terpadvisor DATABASE_URL_SYNC: postgresql://terpadvisor:terpadvisor_dev@db:5432/terpadvisor REDIS_URL: redis://redis:6379/0 CELERY_BROKER_URL: redis://redis:6379/1 depends_on: db: condition: service_healthy redis: condition: service_healthy celery-worker: build: ./backend command: celery -A app.workers.celery_app worker --loglevel=info volumes: - ./backend:/app environment: DATABASE_URL: postgresql+asyncpg://terpadvisor:terpadvisor_dev@db:5432/terpadvisor DATABASE_URL_SYNC: postgresql://terpadvisor:terpadvisor_dev@db:5432/terpadvisor REDIS_URL: redis://redis:6379/0 CELERY_BROKER_URL: redis://redis:6379/1 depends_on: db: condition: service_healthy redis: condition: service_healthy celery-beat: build: ./backend command: celery -A app.workers.celery_app beat --loglevel=info volumes: - ./backend:/app environment: DATABASE_URL: postgresql+asyncpg://terpadvisor:terpadvisor_dev@db:5432/terpadvisor DATABASE_URL_SYNC: postgresql://terpadvisor:terpadvisor_dev@db:5432/terpadvisor REDIS_URL: redis://redis:6379/0 CELERY_BROKER_URL: redis://redis:6379/1 depends_on: db: condition: service_healthy redis: condition: service_healthy volumes: pgdata: