diff --git a/misc/docker-supervisord.conf b/misc/docker-supervisord.conf index a30e4e8..f10cb9a 100644 --- a/misc/docker-supervisord.conf +++ b/misc/docker-supervisord.conf @@ -7,6 +7,7 @@ pidfile=data/supervisord.pid [program:uvicorn] command=uvicorn app.main:app --no-server-header --host 0.0.0.0 numprocs=1 +autorestart=true redirect_stderr=true stdout_logfile=data/uvicorn.log stdout_logfile_maxbytes=50MB @@ -14,6 +15,7 @@ stdout_logfile_maxbytes=50MB [program:incoming_worker] command=inv process-incoming-activities numproc=1 +autorestart=true redirect_stderr=true stdout_logfile=data/incoming.log stdout_logfile_maxbytes=50MB @@ -21,6 +23,7 @@ stdout_logfile_maxbytes=50MB [program:outgoing_worker] command=inv process-outgoing-activities numproc=1 +autorestart=true redirect_stderr=true stdout_logfile=data/outgoing.log stdout_logfile_maxbytes=50MB diff --git a/misc/supervisord.conf b/misc/supervisord.conf index d0d1677..c3123c6 100644 --- a/misc/supervisord.conf +++ b/misc/supervisord.conf @@ -3,6 +3,7 @@ [program:uvicorn] command=%(ENV_VENV_DIR)s/bin/uvicorn app.main:app --no-server-header numprocs=1 +autorestart=true redirect_stderr=true stdout_logfile=uvicorn.log stdout_logfile_maxbytes=50MB @@ -10,6 +11,7 @@ stdout_logfile_maxbytes=50MB [program:incoming_worker] command=%(ENV_VENV_DIR)s/bin/inv process-incoming-activities numproc=1 +autorestart=true redirect_stderr=true stdout_logfile=incoming_worker.log stdout_logfile_maxbytes=50MB @@ -17,6 +19,7 @@ stdout_logfile_maxbytes=50MB [program:outgoing_worker] command=%(ENV_VENV_DIR)s/bin/inv process-outgoing-activities numproc=1 +autorestart=true redirect_stderr=true stdout_logfile=outgoing_worker.log stdout_logfile_maxbytes=50MB diff --git a/misc/ynh-supervisord.conf b/misc/ynh-supervisord.conf index 6da2c85..ce19ca6 100644 --- a/misc/ynh-supervisord.conf +++ b/misc/ynh-supervisord.conf @@ -1,9 +1,9 @@ [supervisord] -[fcgi-program:uvicorn] -socket=tcp://localhost:%(ENV_UVICORN_PORT)s -command=%(ENV_VENV_DIR)s/bin/uvicorn app.main:app --no-server-header --fd 0 -numprocs=2 +[program:uvicorn] +command=%(ENV_VENV_DIR)s/bin/uvicorn app.main:app --no-server-header +numprocs=1 +autorestart=true process_name=uvicorn-%(process_num)d redirect_stderr=true stdout_logfile=%(ENV_LOG_PATH)s/uvicorn.log @@ -12,6 +12,7 @@ stdout_logfile_maxbytes=0 [program:incoming_worker] command=%(ENV_VENV_DIR)s/bin/inv process-incoming-activities numproc=1 +autorestart=true redirect_stderr=true stdout_logfile=%(ENV_LOG_PATH)s/incoming.log stdout_logfile_maxbytes=0 @@ -19,6 +20,7 @@ stdout_logfile_maxbytes=0 [program:outgoing_worker] command=%(ENV_VENV_DIR)s/bin/inv process-outgoing-activities numproc=1 +autorestart=true redirect_stderr=true stdout_logfile=%(ENV_LOG_PATH)s/outgoing.log stdout_logfile_maxbytes=0