version: "3.9"

services:
  webapp:
    build:
      context: .
      dockerfile: prod.Dockerfile
    image: webapp
    restart: unless-stopped
    command: gunicorn --workers=3 webapp.wsgi:application --bind 0.0.0.0:8000
    ports:
      - "8000:8000"
    volumes:
      - sqlite_volume:/app/db
      - static_volume:/app/staticfiles
    environment:
      - DJANGO_SETTINGS_MODULE=webapp.settings_prod

volumes:
  static_volume:
  sqlite_volume: