Changeset View
Changeset View
Standalone View
Standalone View
services/swh-scheduler-api/entrypoint.sh
Show All 13 Lines | "shell") | ||||
;; | ;; | ||||
"swh-scheduler") | "swh-scheduler") | ||||
exec $@ | exec $@ | ||||
;; | ;; | ||||
*) | *) | ||||
wait_pgsql | wait_pgsql | ||||
echo Setup the swh-scheduler API database | echo Setup the swh-scheduler API database | ||||
PGPASSWORD=${POSTGRES_PASSWORD} swh-db-init scheduler \ | PGPASSWORD=${POSTGRES_PASSWORD} swh db-init \ | ||||
--db-name ${POSTGRES_DB} | --db-name ${POSTGRES_DB} scheduler | ||||
echo Starting the swh-scheduler API server | echo Starting the swh-scheduler API server | ||||
exec gunicorn --bind 0.0.0.0:5008 \ | exec gunicorn --bind 0.0.0.0:5008 \ | ||||
--log-level DEBUG \ | --log-level DEBUG \ | ||||
--threads 2 \ | --threads 2 \ | ||||
--workers 2 \ | --workers 2 \ | ||||
--reload \ | --reload \ | ||||
--timeout 3600 \ | --timeout 3600 \ | ||||
swh.scheduler.api.wsgi | swh.scheduler.api.wsgi | ||||
esac | esac |