diff --git a/docker-compose.yml b/docker-compose.yml --- a/docker-compose.yml +++ b/docker-compose.yml @@ -128,6 +128,8 @@ image: swh/objstorage ports: - 5003:5003 + environment: + SWH_CONFIG_FILENAME: /objstorage.yml volumes: - "./conf/objstorage.yml:/objstorage.yml:ro" diff --git a/dockerfiles/swh-objstorage/Dockerfile b/dockerfiles/swh-objstorage/Dockerfile --- a/dockerfiles/swh-objstorage/Dockerfile +++ b/dockerfiles/swh-objstorage/Dockerfile @@ -6,7 +6,7 @@ libsystemd-dev RUN pip install -U pip setuptools wheel -RUN pip install swh-objstorage +RUN pip install swh-objstorage gunicorn COPY entrypoint.sh / diff --git a/dockerfiles/swh-objstorage/entrypoint.sh b/dockerfiles/swh-objstorage/entrypoint.sh --- a/dockerfiles/swh-objstorage/entrypoint.sh +++ b/dockerfiles/swh-objstorage/entrypoint.sh @@ -20,5 +20,10 @@ exec bash -i else echo Starting the swh-objstorage API server - exec python -m swh.objstorage.api.server /objstorage.yml + exec gunicorn --bind 0.0.0.0:5003 \ + --worker-class aiohttp.worker.GunicornWebWorker \ + --log-level DEBUG \ + --reload \ + swh.objstorage.api.wsgi + fi