version: '3.9'

services:
  app:
    container_name: django
    build:
      context: .
      dockerfile: Dockerfile
      target: prod  # Use the 'prod' stage for the app service (production)
    ports:
      - "8025:8000"
    volumes:
      - ./src:/app
    env_file:
      - ./src/.env
    # restart: always  # Uncomment this line if you want the container to automatically restart on failure
    command: /usr/local/bin/start-prod-server.sh  # Use the production server script

  # worker:
  #   container_name: celery
  #   build:
  #     context: .
  #     dockerfile: Dockerfile
  #   volumes:
  #     - ./src:/app
  #   env_file:
  #     - ./src/.env
  #   # restart: always  # Uncomment this line if you want the container to automatically restart on failure
  #   command: /usr/local/bin/start-celery-worker.sh
  #   depends_on:
  #     - app