version: '3.8'

# Production override for docker-compose.yml
# Usage: docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

services:
  web:
    command: >
      sh -c "python manage.py migrate --noinput &&
             (python manage.py collectstatic --noinput || true) &&
             gunicorn worktimeapp.wsgi:application --bind 0.0.0.0:8484 --workers 4 --timeout 120 --access-logfile - --error-logfile -"
    environment:
      - DEBUG=False
    restart: always

  celery:
    command: celery -A worktimeapp worker --loglevel=warning --concurrency=4 --max-tasks-per-child=1000
    restart: always

  celery-beat:
    restart: always

