services: redis: image: redis:alpine restart: unless-stopped app: image: app build: context: ./app args: ENV: ${ENV} PUID: ${USER_ID} PGID: ${GROUP_ID} env_file: - .env # user: "${USER_ID}:${GROUP_ID}" volumes: - ./app:/app - ./backups:/backups - /app/frontend/node_modules restart: unless-stopped ports: - "${LISTEN_PORT:-8000}:8000" command: > bash -c "cd frontend && yarn build && cd .. && python manage.py collectstatic --noinput && python manage.py migrate && uvicorn app.asgi:application --workers 3 --host 0.0.0.0 --port 8000" tasks: image: app volumes_from: - app env_file: - .env # user: "${USER_ID}:${GROUP_ID}" restart: unless-stopped depends_on: - app command: > bash -c "sleep 5 && celery -A app worker --loglevel=info" jobs: image: app volumes_from: - app env_file: - .env # user: "${USER_ID}:${GROUP_ID}" restart: unless-stopped depends_on: - app command: > bash -c "sleep 5 && celery -A app beat --scheduler django_celery_beat.schedulers:DatabaseScheduler --loglevel=info"