openmaptiles-tools icon indicating copy to clipboard operation
openmaptiles-tools copied to clipboard

Cleanup shared directories

Open nyurik opened this issue 5 years ago • 3 comments

We currently have a number of somewhat confusing directories that I think we could improve. Here's a proposed dir structure. Note that none of these will be defined as VOLUME in the Dockerfile. Instead, it will be up to the user to map them with -v if needed.

Update Another proposal is not to hardcode any dir paths in tools, and instead let them all be passed in as parameters.

  • /download -- planet or extract OSM data
  • /imposm -- files needed to run imposm -- usually the combined mapping file and the replication state file (TBD: should replication file be in the imposm-cache/ ?)
  • /imposm-cache -- cache files needed during import and update
  • /sql -- contains all SQL that should be injected after imposm is done

nyurik avatar Mar 17 '20 15:03 nyurik

On second thought, I think it would be better to remove all these directories all together. From the perspective of automation, it is actually better to share one directory with Docker or Kubernetes, not multiple.

So rather than above, I think tools should not hard-code ANY dir paths at all, and let them all be parameters (either as env vars or some other way)

CC: @klokan @MartinMikita @daliborjanak @TomPohys

nyurik avatar Mar 18 '20 01:03 nyurik

Parameters via env vars should be enough. And a default path could be PWD for all scripts, probably?

This default path can be defined when running a docker container...

MartinMikita avatar Mar 18 '20 07:03 MartinMikita

Sounds good. If it will be e.g. added to .env or some new file with folder name variables. Maybe it will help to faster understanding of project.

TomPohys avatar Mar 18 '20 16:03 TomPohys