Skip to content

Commit

Permalink
added geoPlugin to rumal, create GeoPlugin.conf, get mmdb city database
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennisparchkov committed Aug 8, 2016
1 parent c8d354c commit cb7c4e8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ RUN apt-get -y install --no-install-recommends \
python-openssl \
python-pyasn1 \
sed \
sqlite3
sqlite3 \
wget

VOLUME ["/data/db"]

Expand Down
16 changes: 16 additions & 0 deletions frontend/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@ echo 'rabbit_user = admin' >> /opt/rumal/conf/backend.conf
echo 'rabbit_password = admin' >> /opt/rumal/conf/backend.conf
echo 'BE = ' >> /opt/rumal/conf/backend.conf

echo "Creating GeoPlugin.conf"
wget -O /opt/GeoLite2-City.mmdb.gz http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
gunzip /opt/GeoLite2-City.mmdb.gz
# Create the needed configuration file for the geo map plugin
echo "[db_path]" > /opt/rumal/conf/plugins/GeoPlugin.conf
echo 'city = /opt/GeoLite2-City.mmdb' >> /opt/rumal/conf/plugins/GeoPlugin.conf
echo 'anonymous_ip = None' >> /opt/rumal/conf/plugins/GeoPlugin.conf
echo 'connection_type = None' >> /opt/rumal/conf/plugins/GeoPlugin.conf
echo 'isp = None' >> /opt/rumal/conf/plugins/GeoPlugin.conf
echo '' >> /opt/rumal/conf/plugins/GeoPlugin.conf
echo '[dbs]' >> /opt/rumal/conf/plugins/GeoPlugin.conf
echo 'city = True' >> /opt/rumal/conf/plugins/GeoPlugin.conf
echo 'anonymous_ip = False' >> /opt/rumal/conf/plugins/GeoPlugin.conf
echo 'connection_type = False' >> /opt/rumal/conf/plugins/GeoPlugin.conf
echo 'isp = False' >> /opt/rumal/conf/plugins/GeoPlugin.conf

echo "Starting mongod server..."
/usr/bin/sudo /usr/bin/mongod --smallfiles --fork --logpath /var/log/mongod.log

Expand Down

0 comments on commit cb7c4e8

Please sign in to comment.