This repository contains the scripts and config files that are running GraphHopper instances for gpx.studio.
Follow steps described here:
https://github.com/graphhopper/graphhopper/blob/master/docs/core/deploy.md#system-tuning
Some general information is also available here:
With Mapterhorn elevation data, these are the parameters used:
sudo vim /etc/security/limits.conf
* - nofile 5000000
sudo vim /etc/sysctl.conf
vm.swappiness = 0
fs.file-max = 5000000
vm.max_map_count = 4194304
sudo sysctl -p
Install Docker on the server by following the instructions here: https://docs.docker.com/engine/install/ubuntu/. Then, add user to the docker group:
sudo usermod -a -G docker $USER
and log out and log in. Finally, build the Docker image by running the build script.
./build.sh
Open cron file
crontab -e
and add a line to schedule the cron.sh script
20 0 1,14 * * /home/user/graphhopper-config/cron.sh > /home/user/graphhopper-config/cron_logs
Install Nginx:
sudo apt install nginx
Then, replace the default configuration and reload the service.
sudo rm /etc/nginx/sites-enabled/default
sudo cp graphhopper.conf /etc/nginx/sites-enabled/
sudo nginx -s reload
2 servers with 128GB of RAM. Load balancer with health checks.