diff --git a/dockerfiles/swh-storage/Dockerfile b/dockerfiles/swh-storage/Dockerfile --- a/dockerfiles/swh-storage/Dockerfile +++ b/dockerfiles/swh-storage/Dockerfile @@ -6,7 +6,7 @@ libsystemd-dev postgresql-client RUN pip install --upgrade pip setuptools wheel -RUN pip install swh-storage +RUN pip install swh-storage gunicorn COPY entrypoint.sh / diff --git a/dockerfiles/swh-storage/entrypoint.sh b/dockerfiles/swh-storage/entrypoint.sh --- a/dockerfiles/swh-storage/entrypoint.sh +++ b/dockerfiles/swh-storage/entrypoint.sh @@ -37,6 +37,9 @@ --db-name ${POSTGRES_DB} echo Starting the swh-storage API server - exec python -m swh.storage.api.server /storage.yml + exec gunicorn --bind 0.0.0.0:5002 \ + --reload \ + --log-level DEBUG \ + swh.storage.api.wsgi ;; esac diff --git a/env/storage.env b/env/storage.env --- a/env/storage.env +++ b/env/storage.env @@ -2,3 +2,4 @@ POSTGRES_DB=swh-storage PGHOST=swh-storage-db PGUSER=postgres +SWH_CONFIG_FILENAME=/storage.yml \ No newline at end of file