mirror of
https://github.com/getsentry/self-hosted.git
synced 2025-12-08 19:46:14 +00:00
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.
17 lines
487 B
Bash
Executable File
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
|