From 19887f0ed84938b48d269d58bac65359fea83415 Mon Sep 17 00:00:00 2001 From: Peter Gribanov Date: Tue, 30 Jul 2019 17:05:44 +0300 Subject: [PATCH] Add a Symfony Bundle for the Maxmind GeoIP2 API --- gpslab/geoip2/1.1/config/packages/gpslab_geoip.yaml | 9 +++++++++ gpslab/geoip2/1.1/manifest.json | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 gpslab/geoip2/1.1/config/packages/gpslab_geoip.yaml create mode 100644 gpslab/geoip2/1.1/manifest.json diff --git a/gpslab/geoip2/1.1/config/packages/gpslab_geoip.yaml b/gpslab/geoip2/1.1/config/packages/gpslab_geoip.yaml new file mode 100644 index 00000000..6cbebda4 --- /dev/null +++ b/gpslab/geoip2/1.1/config/packages/gpslab_geoip.yaml @@ -0,0 +1,9 @@ +gpslab_geoip: + # Path to download GeoIP database. + cache: '%kernel.cache_dir%/GeoLite2-City.mmdb' + + # URL for download new GeoIP database. + url: 'https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz' + + # Get model data in this locale + locales: [ '%locale%' ] diff --git a/gpslab/geoip2/1.1/manifest.json b/gpslab/geoip2/1.1/manifest.json new file mode 100644 index 00000000..6d8910f1 --- /dev/null +++ b/gpslab/geoip2/1.1/manifest.json @@ -0,0 +1,8 @@ +{ + "bundles": { + "GpsLab\\Bundle\\GeoIP2Bundle\\GpsLabGeoIP2Bundle": ["all"] + }, + "composer-scripts": { + "geoip2:update": "symfony-cmd" + } +}