Openstreat map Docker och docker compose

Split up in separate containers !

Running openstreetmap map in docker was hard. And the docs all wanted to run it bounded with postgress and not in separate containers.
I setup so we can run osm I different containers for you to scale

Clone this GitHub repo and then start it with

docker compose build

then to start it, run

docker compose up

What is happening

First we are building a custom Postgres docker image. The image loads the extension that OSM needs.
Then we start the containers postgres, osm, tile-importer and web

Tile importer will look for the file /status/importer id the file DONT exist it will start the script to provision the Postgres SQL server by loading all the extensions and plugins.
It will then move on to importing tiles of Sweden.
And then install some extra scripts.

Then the init process is done it will write the file /status/imported

OSM container wait to start until the file /status/importer is present.
When the file is present, it will start up the rendered and apache service to start rendering tiles.

url -v http://localhost:8080/hot/0/0/0.png

Then web container connects to OSM over localhost:8080 and displays the tiles. Go to HTTP://localhost:8081 to display the content

IF you want to change any port ore localhost, some more changes are needed.

To do

Make then run from ENV and make helm chart to deploy them into a Kubernetes cluster.