openstreetmap-tile-server icon indicating copy to clipboard operation
openstreetmap-tile-server copied to clipboard

Documentation request for "UPDATES=enabled"

Open Rex-Legor opened this issue 5 years ago • 2 comments

Is this a bug?

No

Is this a question?

Yes

Description

Could be possible to get help on getting info about how the updates flag works? I have a list of questions related to this feature:

  1. Does it requires additional setup and how to do it?
  2. When does it triggers the update or how often?
  3. Can I set up a custom scheduled time for triggering the updates, like every week?
  4. Can I set up multiple files for update? like updating United States and Canada at the same time

Thank you, Ricardo Legorreta

Rex-Legor avatar Dec 21 '20 17:12 Rex-Legor

Does it requires additional setup and how to do it?

No, just set the ENV variable and run the service.

When does it triggers the update or how often?

The run service sets up a crontab that runs every minute.

Can I set up a custom scheduled time for triggering the updates, like every week?

You could overwrite the crontab entry with your own timing. Or even disable the UPDATES and call the update script manually by a cronjob on your host system.

Can I set up multiple files for update? like updating United States and Canada at the same time

I don't know, I never used the automated updater which is using osmosis. I'm not entirely sure how it knows what regions it's supposed to update/download when using manually imported PBFs, but I think you need to provide a poly file with correct bounds for all regions it should update.

Before the update functionality was added, I wrote myself a simple script that runs nightly and which downloads all the new update files (.osc.gz) from geofabrik for the (hardcoded) two regions I'm interested in, (maybe convert them to another file type, ) appends them with osm2pgsql to the database and then re-renders, invalidates or deletes expires tiles (based on the zoom level).

Istador avatar Dec 21 '20 22:12 Istador

I don't think we will document how the update internals work.

nielsole avatar Jul 27 '22 06:07 nielsole