forked from getsentry/self-hosted
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate with MaxMind out of the box (getsentry#766)
Integrate with MaxMind out of the box
- Loading branch information
1 parent
f885ece
commit a623e72
Showing
8 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ ! -f 'install.sh' ]; then echo 'Where are you?'; exit 1; fi | ||
|
||
dc="docker-compose --no-ansi" | ||
dcr="$dc run --rm" | ||
|
||
|
||
install_geoip() { | ||
local mmdb='geoip/GeoLite2-City.mmdb' | ||
local conf='geoip/GeoIP.conf' | ||
local result='Done' | ||
|
||
echo "Setting up IP address geolocation ..." | ||
if [[ ! -f "$mmdb" ]]; then | ||
echo -n "Installing (empty) IP address geolocation database ... " | ||
cp "$mmdb.empty" "$mmdb" | ||
echo "done." | ||
else | ||
echo "IP address geolocation database already exists." | ||
fi | ||
|
||
if [[ ! -f "$conf" ]]; then | ||
echo "IP address geolocation is not configured for updates." | ||
echo "See https://develop.sentry.dev/self-hosted/geolocation/ for instructions." | ||
result='Error' | ||
else | ||
echo "IP address geolocation is configured for updates." | ||
echo "Updating IP address geolocation database ... " | ||
$dcr geoipupdate | ||
if [ $? -gt 0 ]; then | ||
result='Error' | ||
fi | ||
echo "$result updating IP address geolocation database." | ||
fi | ||
echo "$result setting up IP address geolocation." | ||
} | ||
|
||
install_geoip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters