Files
adsassistant/docker-compose.yml
2026-03-05 06:55:42 +03:00

40 lines
1003 B
YAML

services:
agents:
build: ./agents_service
env_file:
- ./agents_service/.env
ports:
- "8001:8001"
backend:
build: ./backend_django
env_file:
- ./backend_django/.env
environment:
# Make sure backend can reach agents by service name inside compose network
- AGENTS_SERVICE_URL=http://agents:8001
- CORS_ALLOWED_ORIGINS=http://localhost:5174,http://localhost:8080
- ALLOWED_HOSTS=127.0.0.1,localhost
depends_on:
- agents
volumes:
# Persist SQLite DB on host
- backend_db:/app/adsassistant_backend/data
ports:
- "8000:8000"
frontend:
build: ./frontend
environment:
# Nginx serves static files; API base is baked at build time for Vite.
# For simplicity we keep default and use browser -> localhost:8000.
# If you want to change, set VITE_API_BASE_URL before build.
- NGINX_PORT=80
ports:
- "5174:80"
depends_on:
- backend
volumes:
backend_db: