From 8f2d83d1cb04ce00b7428629cde8fbbf047821a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Fri, 20 Dec 2024 13:10:34 +0100 Subject: [PATCH] ops: tweak worker check to listen on $PORT env var --- server/pyproject.toml | 2 +- server/supervisord.worker.conf | 2 +- server/supervisord.worker_github.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/pyproject.toml b/server/pyproject.toml index 7972f94307..ccea39f0b0 100644 --- a/server/pyproject.toml +++ b/server/pyproject.toml @@ -83,7 +83,7 @@ backoffice = [ [tool.taskipy.tasks] api = { cmd = "task verify_github_app && env AUTHLIB_INSECURE_TRANSPORT=true uvicorn polar.app:app --reload --workers 1 --host 127.0.0.1 --port 8000", help = "run api service" } -worker = { cmd = "UVICORN_PORT=8888 watchfiles 'supervisord -c supervisord.worker.conf' polar", help = "run worker" } +worker = { cmd = "PORT=8888 watchfiles 'supervisord -c supervisord.worker.conf' polar", help = "run worker" } test = { cmd = "POLAR_ENV=testing python -m pytest --cov polar/ --cov-report=term-missing", help = "run all tests" } test_fast = { cmd = "POLAR_ENV=testing python -m pytest -n auto -p no:sugar --no-cov", help = "run all tests, but fast" } watch_email = { cmd = "POLAR_TEST_WATCH=1 pytest -s -m", help = "preview emails" } diff --git a/server/supervisord.worker.conf b/server/supervisord.worker.conf index 0443bf7b72..b904512e44 100644 --- a/server/supervisord.worker.conf +++ b/server/supervisord.worker.conf @@ -9,7 +9,7 @@ stdout_logfile_maxbytes=0 stderr_logfile_maxbytes=0 [program:worker_health] -command=uvicorn worker_health:app --host 0.0.0.0 +command=uvicorn worker_health:app --host 0.0.0.0 --port %(ENV_PORT)s stdout_logfile=/dev/stdout stderr_logfile=/dev/stderr stdout_logfile_maxbytes=0 diff --git a/server/supervisord.worker_github.conf b/server/supervisord.worker_github.conf index c7e99705ad..9b1a7dac08 100644 --- a/server/supervisord.worker_github.conf +++ b/server/supervisord.worker_github.conf @@ -9,7 +9,7 @@ stdout_logfile_maxbytes=0 stderr_logfile_maxbytes=0 [program:worker_health] -command=uvicorn worker_health:app --host 0.0.0.0 +command=uvicorn worker_health:app --host 0.0.0.0 --port %(ENV_PORT)s stdout_logfile=/dev/stdout stderr_logfile=/dev/stderr stdout_logfile_maxbytes=0