Overv / openstreetmap-tile-server

Docker file for a minimal effort OpenStreetMap tile server
Apache License 2.0
1.22k stars 486 forks source link

Automatic updates supported for whole planet? #327

Open Kofl opened 2 years ago

Kofl commented 2 years ago

Hi,

i try to use UPDATES=enabled as outlined in the documentation for the whole planet on import, but it errors out with no clear error message. Without UPDATES=enabled the import runs fine.

Is it supported at all?

Thanks

map_1 | ALTER ROLE map_1 | + '[' '!' -f /data/region.osm.pbf ']' map_1 | + '[' -n '' ']' map_1 | + '[' enabled == enabled ']' map_1 | ++ osmium fileinfo -g header.option.osmosis_replication_timestamp /data/region.osm.pbf map_1 | + REPLICATION_TIMESTAMP=2022-09-18T23:59:51Z map_1 | + sudo -E -u renderer openstreetmap-tiles-update-expire.sh 2022-09-18T23:59:51Z

docker-compose.yml

version: '3' services: map: image: overv/openstreetmap-tile-server:2.2.0 environment:

  • THREADS=24
  • UPDATES=enabled
  • OSM2PGSQL_EXTRA_ARGS=--flat-nodes /data/tiles/flat_nodes.bin -C 20096 ports:
  • "80:80" volumes:
  • /opt/osm-tiles/planet-latest.osm.pbf:/data/region.osm.pbf
  • osm-data-sql:/data/database/
  • osm-tiles:/data/tiles/
  • /opt/openstreetmap-carto-modified:/data/style/ command: "import" volumes: osm-data-sql: external: true osm-tiles: external: true
galewis2 commented 2 years ago

Yes automatic updates are supported for the whole planet and I've been doing it for awhile. You're not seeing any error messages?

Kofl commented 2 years ago

Great that its supported, the container start only ends with:

map_1 | + sudo -u postgres psql -c 'ALTER USER renderer PASSWORD '\''renderer'\'' map_1 | ALTER ROLE map_1 | + '[' '!' -f /data/region.osm.pbf ']' map_1 | + '[' -n '' ']' map_1 | + '[' enabled == enabled ']' map_1 | ++ osmium fileinfo -g header.option.osmosis_replication_timestamp /data/region.osm.pbf map_1 | + REPLICATION_TIMESTAMP=2022-09-18T23:59:51Z map_1 | + sudo -E -u renderer openstreetmap-tiles-update-expire.sh 2022-09-18T23:59:51Z osm_map_1 exited with code 1

planet is from https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf

Istador commented 2 years ago

What should be next in the log should be the output of the wget command: https://github.com/Overv/openstreetmap-tile-server/blob/10571b77b756bea8046f59de08d27f84c4faffe9/openstreetmap-tiles-update-expire.sh#L110-L116

Example output: https://github.com/Overv/openstreetmap-tile-server/actions/runs/3136263671/jobs/5108530228#step:7:862

But because we don't have any wget output it likely has an error in the code above.

I suspect that pyosmium-get-changes has an (temporary) issue when trying to silently download from https://planet.openstreetmap.org/replication/hour/. Try it again.

Kofl commented 2 years ago

Thanks for the detailed explanation. I will retry over the coming days and report back.