| version: '3.8' | |
| services: | |
| db: | |
| image: postgres:15 | |
| volumes: | |
| - postgres_data:/var/lib/postgresql/data | |
| environment: | |
| POSTGRES_DB: educonnect_db | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| ports: | |
| - "5432:5432" | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - "6379:6379" | |
| web: | |
| build: . | |
| command: python manage.py runserver 0.0.0.0:8000 | |
| volumes: | |
| - .:/app | |
| - media_volume:/app/media | |
| - static_volume:/app/staticfiles | |
| ports: | |
| - "8000:8000" | |
| environment: | |
| - DEBUG=True | |
| - DB_HOST=db | |
| - REDIS_HOST=redis | |
| depends_on: | |
| - db | |
| - redis | |
| celery: | |
| build: . | |
| command: celery -A educonnect_api worker -l info | |
| volumes: | |
| - .:/app | |
| environment: | |
| - DEBUG=True | |
| - DB_HOST=db | |
| - REDIS_HOST=redis | |
| depends_on: | |
| - db | |
| - redis | |
| channels: | |
| build: . | |
| command: daphne -b 0.0.0.0 -p 8001 educonnect_api.asgi:application | |
| volumes: | |
| - .:/app | |
| ports: | |
| - "8001:8001" | |
| environment: | |
| - DEBUG=True | |
| - DB_HOST=db | |
| - REDIS_HOST=redis | |
| depends_on: | |
| - db | |
| - redis | |
| volumes: | |
| postgres_data: | |
| media_volume: | |
| static_volume: |