Skip to content
Snippets Groups Projects
Unverified Commit 35a16a95 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

cassandra-checks: Unify entrypoint copy and format

It's copied at the end of the Dockerfile so modification to it do not rebuild
deps. The entrypoint script is also adapted to work with actual docker run
calls.
parent 09717577
No related branches found
Tags swh-loader-package-20220909.1
No related merge requests found
......@@ -14,15 +14,16 @@ 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 && \
RUN /usr/local/bin/python -m pip install --upgrade pip && \
pip install --no-cache-dir -r requirements-frozen.txt
COPY --chown=swh:swh entrypoint.sh /opt/swh
RUN chmod u+x /opt/swh/entrypoint.sh
ENV SWH_CONFIG_FILENAME=/etc/swh/config.yml
ENTRYPOINT ["/opt/swh/entrypoint.sh"]
......@@ -14,13 +14,16 @@ else
fi
case "$1" in
"shell")
shift
echo "Running command $@"
exec bash -i "$@"
;;
*)
echo Starting Cassandra objects checker.
exec $CLONE_DIR/sysadmin/cassandra_checks/get_journal_check_and_replay.py
;;
"shell")
shift
if (( $# == 0)); then
exec bash -i
else
"$@"
fi
;;
*)
echo Starting Cassandra objects checker.
exec $CLONE_DIR/sysadmin/cassandra_checks/get_journal_check_and_replay.py
;;
esac
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