| version: '3.8' | |
| services: | |
| # PostgreSQL Database | |
| postgres: | |
| image: postgres:15 | |
| container_name: auranexus_postgres | |
| environment: | |
| POSTGRES_DB: auranexus | |
| POSTGRES_USER: auranexus_user | |
| POSTGRES_PASSWORD: auranexus_password | |
| volumes: | |
| - postgres_data:/var/lib/postgresql/data | |
| ports: | |
| - "5432:5432" | |
| networks: | |
| - auranexus_network | |
| # Redis for caching and Celery | |
| redis: | |
| image: redis:7-alpine | |
| container_name: auranexus_redis | |
| ports: | |
| - "6379:6379" | |
| volumes: | |
| - redis_data:/data | |
| networks: | |
| - auranexus_network | |
| # API Server | |
| api: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile.api | |
| container_name: auranexus_api | |
| ports: | |
| - "8000:8000" | |
| environment: | |
| - DATABASE_URL=postgresql://auranexus_user:auranexus_password@postgres:5432/auranus | |
| - REDIS_URL=redis://redis:6379/0 | |
| - SECRET_KEY=auranexus-secret-key-change-in-production | |
| - CELERY_BROKER_URL=redis://redis:6379/0 | |
| depends_on: | |
| - postgres | |
| - redis | |
| volumes: | |
| - ./auranexus:/app | |
| networks: | |
| - auranexus_network | |
| command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload | |
| # Frontend | |
| frontend: | |
| image: nginx:alpine | |
| container_name: auranexus_frontend | |
| ports: | |
| - "3000:80" | |
| volumes: | |
| - ./frontend:/usr/share/nginx/html | |
| networks: | |
| - auranexus_network | |
| volumes: | |
| postgres_data: | |
| redis_data: | |
| networks: | |
| auranexus_network: | |
| driver: bridge |