self-hosted/sentry/entrypoint.sh
Kyle Filz 17b675c833
feat: Support custom CA roots (#1015)
Mount a certificate folder to local ca storage in containers,
and add update command to cron image's entrypoint.

Result of poking and prodding from getsentry/sentry#26851
2021-07-30 18:39:47 +03:00

21 lines
574 B
Bash
Executable File

#!/bin/bash
set -e
if [ "$(ls -A /usr/local/share/ca-certificates/)" ]; then
update-ca-certificates
fi
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