version: '3.8'

services:
  web:
    restart: always
    env_file:
      - .env
    build:
      context: .
      dockerfile: deployments/compose/django/Dockerfile
    command: /start
    volumes:
      - .:/app
    ports:
      - ${PORT:-8001}:8000
    depends_on:
      - db
#      - rabbitmq
#      - redis

  db:
    image: postgres:15-alpine
    restart: always
    environment:
      POSTGRES_DB: djangodefault
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: '1253'
    volumes:
      - pg_data:/var/lib/postgresql/data


#  redis:
#    restart: always
#    image: redis
#
#  rabbitmq:
#    image: rabbitmq:management
#    env_file:
#      - .env
#    restart: always
#    container_name: rabbitmq
#    environment:
#      - RABBITMQ_DEFAULT_USER=guest
#      - RABBITMQ_DEFAULT_PASS=guest
#    ports:
#      - ${RABBITMQ_PORT:-15672}:15672
#    volumes:
#      - rabbitmq:/var/lib/rabbitmq
#
#
#
#  celery_worker:
#    build:
#      context: .
#      dockerfile: ./deployments/compose/django/Dockerfile
#    image: celery_worker
#    command: /start-celeryworker
#    restart: always
#    volumes:
#      - .:/app
#    env_file:
#      - .env
#    depends_on:
#      - redis
#      - rabbitmq
#      - db
#
#  celery_beat:
#    build:
#      context: .
#      dockerfile: ./deployments/compose/django/Dockerfile
#    command: /start-celerybeat
#    restart: always
#    volumes:
#      - .:/app
#    env_file:
#      - .env
#    depends_on:
#      - redis
#      - rabbitmq
#      - db
#
#  flower:
#    env_file:
#      - .env
#    build:
#      context: .
#      dockerfile: ./deployments/compose/django/Dockerfile
#    command: /start-flower
#    restart: always
#    volumes:
#      - .:/app
#    ports:
#      - ${CELERY_FLOWER:-5555}:5555
#    depends_on:
#      - redis
#      - rabbitmq
#      - db



volumes:
  pg_data:
#  rabbitmq:
