self-hosted/sentry/entrypoint.sh
Burak Yigit Kaya a1c0c1fd0c
ref: Stop building local images for Sentry services (#834)
We used to build local images for Sentry services to be able to
include required plugins in the image. With this change we instead
do this in a custom entrypoint script and use the volume `/data`
to store the plugins permanently.

This should resolve many issues people have around building local
images and pushing them to places like private repositories or swarm
clusters.

This is not 100% compatible with the old way but it should still be
a mostly transparent change to many folks.
2021-02-04 12:15:59 +00:00

17 lines
487 B
Bash
Executable File

#!/bin/bash
set -e
req_file="/etc/sentry/requirements.txt"
plugins_dir="/data/custom-packages"
checksum_file="$plugins_dir/.checksum"
if [[ -s "$req_file" ]] && ! cat "$req_file" | grep '^[^#[:space:]]' | shasum -s -c "$checksum_file" 2>/dev/null; then
echo "Installing additional dependencies..."
mkdir -p "$plugins_dir"
pip install --user -r "$req_file"
cat "$req_file" | grep '^[^#[:space:]]' | shasum > "$checksum_file"
echo ""
fi
source /docker-entrypoint.sh