-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker image for Overpass #374
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 (
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -23,7 +23,7 @@ if [ ! -d /db/db ] ; then | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll create a seperate pull request for usage text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#381 it is
commit f2560c7 Author: W <[email protected]> Date: Fri Mar 17 16:14:07 2017 +0100 Add --map-compression-method to usage message commit c71d26e Author: W <[email protected]> Date: Fri Mar 17 16:00:12 2017 +0100 Fix spelling of parameter name in usage message commit 122ea06 Author: W <[email protected]> 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.sh
may start beforedispatcher
is ready. Thanks to changes in #373 it will die and start again, whendispatcher
is fully working.Changes in src/bin/fetch_osc.sh skips the download of files already available locally on restart of the container.