forked from amigocloud/modified-tripplanner
-
Notifications
You must be signed in to change notification settings - Fork 1
OTP Supervisor Config
Vivek edited this page Dec 2, 2016
·
4 revisions
Every day around 5am pst (as specified in /etc/crontab/
) the /srv/vta.amigocloud.com/load_data.sh
is run. This creates about 2 minutes of downtime.
This script pulls a new OSM file, updates the GTFS files, and runs a build command:
# !/bin/sh
java -Xmx3G -Xverify:none -jar /srv/vta.amigocloud.com/OTP/target/otp-1.0.0-shaded.jar --build /srv/vta.amigocloud.com/data --cache /srv/vta.amigocloud.com/ned/
mv ../data/Graph.obj ../data/graphs/default/
Supervisor calls a run command to OTP:
[program:vta_otp]
command=java -Xmx6G -Xverify:none -jar /srv/vta.amigocloud.com/OTP/target/otp-1.0.0-shaded.jar --basePath /srv/vta.amigocloud.com/data/ --router default --server --port 8888 --cache /srv/vta.amigocloud.com/ned --autoReload --autoScan
Whenever updating supervisor, be sure to run:
sudo supervisorctl reread
sudo supervisorctl update
Create the needed folders and make them readable by www-data
cd /srv/vta.amigocoud.com/
mkdir -p /srv/vta.amigocoud.com/data/graphs/default
chown root -R ./data
chgrp www-data -R ./data
chmod 775 -R ./data