|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| services:
|
|
|
|
|
| mac:
|
| build: .
|
| container_name: mac-api
|
| ports:
|
| - "8000:8000"
|
| env_file: .env
|
| environment:
|
| - DATABASE_URL=postgresql+asyncpg://mac:mac_password@postgres:5432/mac_db
|
| - REDIS_URL=redis://redis:6379/0
|
| - QDRANT_URL=http://qdrant:6333
|
| - SEARXNG_URL=http://searxng:8080
|
| - IS_CONTROL_NODE=true
|
| - MAX_RESOURCE_PCT=85
|
|
|
|
|
| depends_on:
|
| postgres:
|
| condition: service_healthy
|
| redis:
|
| condition: service_healthy
|
| restart: unless-stopped
|
| networks:
|
| - mac-net
|
|
|
|
|
| postgres:
|
| image: postgres:16-alpine
|
| container_name: mac-postgres
|
| environment:
|
| POSTGRES_USER: mac
|
| POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mac_password}
|
| POSTGRES_DB: mac_db
|
| ports:
|
| - "5432:5432"
|
| volumes:
|
| - pgdata:/var/lib/postgresql/data
|
| healthcheck:
|
| test: ["CMD-SHELL", "pg_isready -U mac -d mac_db"]
|
| interval: 5s
|
| timeout: 5s
|
| retries: 5
|
| restart: unless-stopped
|
| networks:
|
| - mac-net
|
|
|
|
|
| redis:
|
| image: redis:7-alpine
|
| container_name: mac-redis
|
| ports:
|
| - "6379:6379"
|
| volumes:
|
| - redisdata:/data
|
| healthcheck:
|
| test: ["CMD", "redis-cli", "ping"]
|
| interval: 5s
|
| timeout: 5s
|
| retries: 5
|
| restart: unless-stopped
|
| networks:
|
| - mac-net
|
|
|
|
|
| nginx:
|
| image: nginx:alpine
|
| container_name: mac-nginx
|
| ports:
|
| - "80:80"
|
| volumes:
|
| - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
| - ./frontend:/usr/share/nginx/html:ro
|
| depends_on:
|
| - mac
|
| restart: unless-stopped
|
| networks:
|
| - mac-net
|
|
|
|
|
| qdrant:
|
| image: qdrant/qdrant:latest
|
| container_name: mac-qdrant
|
| ports:
|
| - "6333:6333"
|
| volumes:
|
| - qdrantdata:/qdrant/storage
|
| restart: unless-stopped
|
| networks:
|
| - mac-net
|
|
|
|
|
| searxng:
|
| image: searxng/searxng:latest
|
| container_name: mac-searxng
|
| ports:
|
| - "8888:8080"
|
| environment:
|
| - SEARXNG_BASE_URL=http://localhost:8888/
|
| volumes:
|
| - searxngdata:/etc/searxng
|
| restart: unless-stopped
|
| networks:
|
| - mac-net
|
|
|
| volumes:
|
| pgdata:
|
| redisdata:
|
| qdrantdata:
|
| searxngdata:
|
|
|
| networks:
|
| mac-net:
|
| driver: bridge
|
|
|