Frankkkkk / docker-overpass-api

A fully working overpass-api docker image: cloning, replication, areas and www interface
The Unlicense
31 stars 20 forks source link

option to update monthly? #4

Open joernhees opened 7 years ago

joernhees commented 7 years ago

hi, cool docker service to set up an in sync mirror, but is it somehow possible to only update let's say monthly? or maybe even only on demand?

Frankkkkk commented 7 years ago

Thanks

If you don't want to update "ever" the best is to comment these lines:


#run the diff fetcher
$BINDIR/fetch_osc_and_apply.sh $REPLICATE_SERVER --meta=yes &

#AREAS
echo "Will run areas"
cp -pR $OPASS_MAIN/src/rules $DBDIR/
$BINDIR/dispatcher --areas --db-dir=$DBDIR &

sleep 5
echo "Will run rules loop"
$BINDIR/rules_loop.sh $DBDIR &

However this won't generate areas.

If you want instead areas but not updates, you can comment the fetch_osc_and_apply line, areas will be generated each year. It's a bit of a waste of ressources but it's the simples way..

I could maybe to manage a patch if you really need this option .

Cheers

joernhees commented 7 years ago

an --update=never or --update=monthly would definitely be cool and save a lot of CPU time for people who don't really need a very up-to-date mirror...

joernhees commented 7 years ago

hmm, even commenting all those lines out, i still see /Overpass-API/src/bin//update_database --meta do a lot of work?!?