Skip to content
Snippets Groups Projects
Commit 59a3e760 authored by Guillaume Samson's avatar Guillaume Samson
Browse files

Add an image for swh-storage service

Related to sysadm-environment#4811
parent 61e2e7bc
No related branches found
No related tags found
1 merge request!20Add an image for swh-storage service
This commit is part of merge request !20. Comments created here will be created in the context of that merge request.
# Deeply inspired from the Dockerfile of the swh-graphql project
FROM python:3.10-bullseye
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get install -y libcmph-dev librdkafka-dev && \
apt clean && \
addgroup --gid 1000 swh && \
useradd --gid 1000 --uid 1000 -m -d /opt/swh swh && \
mkdir /etc/swh
USER swh
WORKDIR /opt/swh
COPY --chown=swh:swh requirements-frozen.txt /opt/swh
COPY --chown=swh:swh entrypoint.sh /opt/swh
ENV PYTHONPATH=/opt/swh
ENV PATH=/opt/swh/.local/bin:$PATH
RUN chmod u+x /opt/swh/entrypoint.sh && \
/usr/local/bin/python -m pip install --upgrade pip && \
pip install --no-cache-dir -r requirements-frozen.txt && \
pip install gunicorn
ENV SWH_CONFIG_FILENAME=/etc/swh/config.yml
ENV PORT 5002
EXPOSE $PORT
ENV THREADS 4
ENV WORKERS 2
ENV LOG_LEVEL INFO
ENV TIMEOUT 3600
ENTRYPOINT ["/opt/swh/entrypoint.sh"]
#!/bin/bash
set -e
case "$1" in
"shell")
exec bash -i
;;
"swh")
shift
echo "Running swh command $@"
exec swh $@
;;
*)
echo Starting the swh-storage API server
exec gunicorn --bind 0.0.0.0:${PORT} \
--threads ${THREADS} \
--workers ${WORKERS} \
--log-level ${LOG_LEVEL} \
--timeout ${TIMEOUT} \
--config 'python:swh.core.api.gunicorn_config' \
'swh.storage.api.server:make_app_from_configfile()'
;;
esac
aiohttp==3.8.4
aiohttp-utils==3.2.1
aiosignal==1.3.1
async-timeout==4.0.2
attrs==22.2.0
attrs-strict==1.0.0
blinker==1.5
cassandra-driver==3.25.0
certifi==2022.12.7
cffi==1.15.1
charset-normalizer==3.1.0
click==8.1.3
confluent-kafka==2.0.2
Deprecated==1.2.13
exceptiongroup==1.1.1
Flask==2.2.3
frozenlist==1.3.3
geomet==0.2.1.post1
gunicorn==20.1.0
hypothesis==6.70.0
idna==3.4
iniconfig==2.0.0
iso8601==1.1.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.2
mirakuru==2.5.1
msgpack==1.0.5
multidict==6.0.4
mypy-extensions==1.0.0
packaging==23.0
pluggy==1.0.0
port-for==0.6.3
psutil==5.9.4
psycopg2==2.9.5
pycparser==2.21
pytest==7.2.2
pytest-postgresql==3.1.3
python-dateutil==2.8.2
python-magic==0.4.27
python-mimeparse==1.6.0
PyYAML==6.0
redis==4.5.3
requests==2.28.2
sentry-sdk==1.17.0
six==1.16.0
sortedcontainers==2.4.0
swh.core==2.21.2
swh.counters==0.9.2
swh.journal==1.3.1
swh.model==6.6.3
swh.objstorage==2.1.0
swh.perfecthash==0.1.2
swh.storage==1.11.0
tenacity==8.2.2
tomli==2.0.1
typing_extensions==4.5.0
urllib3==1.26.15
Werkzeug==2.2.3
wrapt==1.15.0
yarl==1.8.2
swh.storage
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment