diff --git a/shelly-manager/rootfs/etc/services.d/api/run b/shelly-manager/rootfs/etc/services.d/api/run index 0b15c35..93458e2 100755 --- a/shelly-manager/rootfs/etc/services.d/api/run +++ b/shelly-manager/rootfs/etc/services.d/api/run @@ -10,7 +10,10 @@ LOG_LEVEL="${LOG_LEVEL:-info}" API_PORT="${API_PORT:-8000}" -exec s6-setuidgid abc /app/.venv/bin/uvicorn api.main:app \ +WORKERS="${API_WORKERS:-4}" +exec s6-setuidgid abc /app/.venv/bin/uvicorn api.main:app_factory \ + --factory \ --host 0.0.0.0 \ --port "${API_PORT}" \ - --log-level "${LOG_LEVEL}" + --log-level "${LOG_LEVEL}" \ + --workers "${WORKERS}"