Conversation
Based on NGINX image. Uses supervisord to run: * nginx * fastcgi wrapper * Overpass dispatcher * fetch_osc.sh * apply_osc_to_db.sh On first run initializes itself with the data. Details provided in README_Docker.md.
|
Thanks! This needs some cross checking with what has already been done in #318 and the +/- 5 other Docker images proposed so far. One example is the topic of area creation and running an area dispatcher. |
|
I was using some of the Dockerfiles as inspiration. The only part that I'm aware, that's missing is:
If for areas support I need two extra processes:
And populate |
|
Compression settings could also be interesting beyond area and attic support. |
Add liblz4 to image so Overpass will support additional compression algorithm. Add two processes: * dispatcher_areas - for calculating areas * areas_rules - rules loop Added src/rules to databases directory Added OVERPASS_COMPRESSION environment variable Added `attic` value to OVERPASS_META variable
|
I've just added area creation, attic support. I've tried added compression but though i added --enable-lz4 and it looks like it's properly identified, bin/update_database doesn't report --compression=lz4. |
I think that's a bug in the coding ( ): the help/usage text doesn't correctly reflect the available compression options. It should be similar to line 97 in update_database.cc.Obviously, the parameter itself is also incorrect: |
As mentioned in drolbr#374 (comment) I'm adding missing lz4 information.
docker-entrypoint.sh
Outdated
| META="--meta=$OVERPASS_META" | ||
| fi | ||
| mkdir -p /db/db \ | ||
| && /app/bin/download_clone.sh --db-dir=/db/db --source=http://dev.overpass-api.de/api_drolbr/ $META "--compresion_method=$OVERPASS_COMPRESSION" \ |
There was a problem hiding this comment.
download_clone.sh just downloads existing files from dev.overpass-api.de with a predefined compression setting, i.e. there's not much point to provide a compression method parameter, as it will not have any impact.
Your documentation above correctly mentions that this only works in init mode, though.
docker-entrypoint.sh
Outdated
|
|
||
| if [ "$OVERPASS_MODE" = "init" ]; then | ||
| lftp -c "get -c \"$OVERPASS_PLANET_URL\" -o /db/planet; exit" \ | ||
| && /app/bin/init_osm3s.sh /db/planet /db/db /app "--meta=$OVERPASS_META" \ |
There was a problem hiding this comment.
compression setting is better suited here.
`OVERPASS_COMPRESSION` makes sense only for init_osm3s not for download_clone. Reported by: @mmd-osm
|
God catch, thanks. |
docker-entrypoint.sh
Outdated
| if [ "$OVERPASS_MODE" = "init" ]; then | ||
| lftp -c "get -c \"$OVERPASS_PLANET_URL\" -o /db/planet; exit" \ | ||
| && /app/bin/init_osm3s.sh /db/planet /db/db /app "--meta=$OVERPASS_META" \ | ||
| && /app/bin/init_osm3s.sh /db/planet /db/db /app "--meta=$OVERPASS_META" "--compresion_method=$OVERPASS_COMPRESSION" \ |
There was a problem hiding this comment.
... and the parameter should be --compression-method= with a dash (not an underscore, the usage text is wrong) and two "s" in compression.
There was a problem hiding this comment.
Ok, I'll create a seperate pull request for usage text
commit f2560c7 Author: W <github@vink.pl> Date: Fri Mar 17 16:14:07 2017 +0100 Add --map-compression-method to usage message commit c71d26e Author: W <github@vink.pl> Date: Fri Mar 17 16:00:12 2017 +0100 Fix spelling of parameter name in usage message commit 122ea06 Author: W <github@vink.pl> Date: Thu Mar 16 22:56:00 2017 +0100 Fix help message for LZ4 compilation. As mentioned in drolbr#374 (comment) I'm adding missing lz4 information.
Based on NGINX image. Uses supervisord to run:
On first run initializes itself with the data. Details provided in README_Docker.md.
This depends on changes in: #373.
apply_osc_to_db.shmay start beforedispatcheris ready. Thanks to changes in #373 it will die and start again, whendispatcheris fully working.Changes in src/bin/fetch_osc.sh skips the download of files already available locally on restart of the container.