version: '3.8'

services:
  flask:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: whisper-app
    restart: always
    mem_limit: 15g
    memswap_limit: 30g
    environment:
      - OPENAI_API_KEY=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
    command: >
      gunicorn --bind 0.0.0.0:5050 --timeout 600 --workers 2 app:app
      
  nginx:
    image: nginx:latest
    container_name: nginx-proxy
    ports:
      - "85:85"
    volumes:
      - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - flask
