diff --git a/docker-compose.yml b/docker-compose.yml index 7e37ae2..ba98b69 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ - services: # PostgreSQL Database postgres: @@ -30,41 +29,6 @@ services: timeout: 10s retries: 3 - # LiveKit Server - livekit: - image: livekit/livekit-server:latest - ports: - - "7880:7880" - - "7881:7881" - - "7882:7882/udp" - - "3478:3478/udp" - volumes: - - caddy_data:/certs - depends_on: - - caddy - restart: unless-stopped - environment: - LIVEKIT_CONFIG: | - keys: - devkey: devkey_secret_32chars_minimum_length - webhook: - api_key: devkey - turn: - enabled: true - tls_port: 5349 - domain: hr.aiquity.xyz - cert_file: /certs/certificates/acme-v02.api.letsencrypt.org-directory/${DOMAIN:-localhost}/${DOMAIN:-localhost}.crt - key_file: /certs/certificates/acme-v02.api.letsencrypt.org-directory/${DOMAIN:-localhost}/${DOMAIN:-localhost}.key - port: 7880 - rtc: - tcp_port: 7881 - port_range_start: 50000 - port_range_end: 60000 - use_external_ip: true - redis: - address: redis:6379 - - # HR AI Backend backend: image: cr.yandex/crp9p5rtbnbop36duusi/hr-ai-backend:latest @@ -77,27 +41,52 @@ services: - REDIS_CACHE_URL=redis - REDIS_CACHE_PORT=6379 - REDIS_CACHE_DB=0 - - LIVEKIT_URL=ws://livekit:7880 - - LIVEKIT_API_KEY=devkey - - LIVEKIT_API_SECRET=devkey_secret_32chars_minimum_length + - LIVEKIT_URL=wss://hackaton-eizc9zqk.livekit.cloud + - LIVEKIT_API_KEY=APIeGb3j9Lwy6mK + - LIVEKIT_API_SECRET=7nb0gKY97sZ42RneonSnsXwf3RRqL4c1JB6zgAyhqES - APP_ENV=development - DEBUG=true + command: ["uv", "run", "fastapi", "dev", "main.py", "--host", "0.0.0.0", "--port", "8000"] volumes: - ./agent_commands:/tmp/agent_commands - backend_uploads:/app/uploads + - shared_tmp:/tmp depends_on: postgres: condition: service_healthy redis: condition: service_healthy - livekit: - condition: service_started healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 30s timeout: 10s retries: 3 + # CELERY + celery: + image: cr.yandex/crp9p5rtbnbop36duusi/hr-ai-backend:latest + env_file: + - .env + environment: + - DATABASE_URL=postgresql+asyncpg://hr_user:hr_password@postgres:5432/hr_ai + - REDIS_CACHE_URL=redis + - REDIS_CACHE_PORT=6379 + - REDIS_CACHE_DB=0 + - LIVEKIT_URL=wss://hackaton-eizc9zqk.livekit.cloud + - LIVEKIT_API_KEY=APIeGb3j9Lwy6mK + - LIVEKIT_API_SECRET=7nb0gKY97sZ42RneonSnsXwf3RRqL4c1JB6zgAyhqES + - APP_ENV=development + - DEBUG=true + container_name: celery + restart: always + command: ["uv", "run", "celery", "-A", "celery_worker.celery_app", "worker", "--loglevel=info"] + volumes: + - shared_tmp:/tmp + depends_on: + postgres: + condition: service_healthy + redis: + condition: service_healthy # Caddy reverse proxy with automatic HTTPS caddy: @@ -111,13 +100,13 @@ services: - caddy_config:/config depends_on: - backend - - livekit environment: - DOMAIN=${DOMAIN:-localhost} restart: unless-stopped frontend: image: cr.yandex/crp9p5rtbnbop36duusi/hr-ai-frontend:latest + platform: linux/amd64 expose: - "3000" environment: @@ -129,5 +118,6 @@ volumes: postgres_data: redis_data: backend_uploads: + shared_tmp: caddy_data: caddy_config: \ No newline at end of file