name: lemonhealth-fastapi-backend
services:
  app:
    build:
      context: .
    container_name: lemonhealth-fastapi-backend
    ports:
      - "8000:8000"
    depends_on:
      - db
      - redis
    volumes:
      - .:/app
      - media_data:/app/media
    env_file:
      - .env.docker
    restart: always
  db:
    image: postgres:15
    container_name: lemonhealth-postgres-db
    restart: always
    env_file:
      - .env.docker
    volumes:
      - postgres_data:/var/lib/postgresql/data
    # ports:
    #   - "5433:5432"
  redis:
    image: redis:7-alpine
    container_name: lemonhealth-redis
    restart: always
    ports:
      - "6380:6379"
    volumes:
      - redis_data:/data

volumes:
  postgres_data:
  media_data:
  redis_data:

networks:
  lemonhealth_fastapi_backend:
