upd compose for sharing between backend and celery
This commit is contained in:
parent
057aaa8149
commit
2afc43e800
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
# PostgreSQL Database
|
# PostgreSQL Database
|
||||||
postgres:
|
postgres:
|
||||||
@ -30,41 +29,6 @@ services:
|
|||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
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
|
# HR AI Backend
|
||||||
backend:
|
backend:
|
||||||
image: cr.yandex/crp9p5rtbnbop36duusi/hr-ai-backend:latest
|
image: cr.yandex/crp9p5rtbnbop36duusi/hr-ai-backend:latest
|
||||||
@ -77,27 +41,52 @@ services:
|
|||||||
- REDIS_CACHE_URL=redis
|
- REDIS_CACHE_URL=redis
|
||||||
- REDIS_CACHE_PORT=6379
|
- REDIS_CACHE_PORT=6379
|
||||||
- REDIS_CACHE_DB=0
|
- REDIS_CACHE_DB=0
|
||||||
- LIVEKIT_URL=ws://livekit:7880
|
- LIVEKIT_URL=wss://hackaton-eizc9zqk.livekit.cloud
|
||||||
- LIVEKIT_API_KEY=devkey
|
- LIVEKIT_API_KEY=APIeGb3j9Lwy6mK
|
||||||
- LIVEKIT_API_SECRET=devkey_secret_32chars_minimum_length
|
- LIVEKIT_API_SECRET=7nb0gKY97sZ42RneonSnsXwf3RRqL4c1JB6zgAyhqES
|
||||||
- APP_ENV=development
|
- APP_ENV=development
|
||||||
- DEBUG=true
|
- DEBUG=true
|
||||||
|
command: ["uv", "run", "fastapi", "dev", "main.py", "--host", "0.0.0.0", "--port", "8000"]
|
||||||
volumes:
|
volumes:
|
||||||
- ./agent_commands:/tmp/agent_commands
|
- ./agent_commands:/tmp/agent_commands
|
||||||
- backend_uploads:/app/uploads
|
- backend_uploads:/app/uploads
|
||||||
|
- shared_tmp:/tmp
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
livekit:
|
|
||||||
condition: service_started
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
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 reverse proxy with automatic HTTPS
|
||||||
caddy:
|
caddy:
|
||||||
@ -111,13 +100,13 @@ services:
|
|||||||
- caddy_config:/config
|
- caddy_config:/config
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
- livekit
|
|
||||||
environment:
|
environment:
|
||||||
- DOMAIN=${DOMAIN:-localhost}
|
- DOMAIN=${DOMAIN:-localhost}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
image: cr.yandex/crp9p5rtbnbop36duusi/hr-ai-frontend:latest
|
image: cr.yandex/crp9p5rtbnbop36duusi/hr-ai-frontend:latest
|
||||||
|
platform: linux/amd64
|
||||||
expose:
|
expose:
|
||||||
- "3000"
|
- "3000"
|
||||||
environment:
|
environment:
|
||||||
@ -129,5 +118,6 @@ volumes:
|
|||||||
postgres_data:
|
postgres_data:
|
||||||
redis_data:
|
redis_data:
|
||||||
backend_uploads:
|
backend_uploads:
|
||||||
|
shared_tmp:
|
||||||
caddy_data:
|
caddy_data:
|
||||||
caddy_config:
|
caddy_config:
|
Loading…
Reference in New Issue
Block a user