Improve Sentry integration

This commit is contained in:
Michal Čihař 2020-04-14 15:23:07 +02:00
parent c436f3bf62
commit 6fa174fe4a
2 changed files with 7 additions and 0 deletions

View file

@ -6,6 +6,8 @@ echo "Weblate title:"
read title
echo "Sentry DSN:"
read sentry
echo "Sentry Token:"
read sentry_token
echo "Matomo site id:"
read matomo
echo "Matomo token:"
@ -18,6 +20,7 @@ WEBLATE_DOMAIN="$domain"
WEBLATE_TITLE="$title"
WEBLATE_SECRET=$(openssl rand -hex 32)
WEBLATE_SENTRY="$sentry"
WEBLATE_SENTRY_TOKEN="$sentry_token"

# Matomo
MATOMO_SITE="$matomo"

View file

@ -79,6 +79,10 @@ sed -i \
-e "s#^SITE_TITLE.*#SITE_TITLE = '$WEBLATE_TITLE'#" \
-e "s#^ALLOWED_HOSTS.*#ALLOWED_HOSTS = ['$WEBLATE_DOMAIN']#" \
-e "s#^SENTRY_DSN.*#SENTRY_DSN = '$WEBLATE_SENTRY'#" \
-e "/SENTRY_DSN/ a \
SENTRY_ENVIRONMENT = ALLOWED_HOSTS[0]" \
-e "/SENTRY_DSN/ a \
SENTRY_TOKEN = '$WEBLATE_SENTRY_TOKEN'" \
-e "s#^ \"PASSWORD\":.*# \"PASSWORD\": '$POSTGRES_PASS',#" \
-e "s#.*your_email@example.com.*# ('Michal Čihař', 'michal@cihar.com'),#" \
-e '/social_core.pipeline.social_auth.load_extra_data/ a \