From 291ef08507c070f38bfef7095479fecaf4497460 Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 22 Jun 2023 11:08:13 +0200 Subject: [PATCH] FEATURE: add a command for accessing the bash terminal --- README.md | 19 +++++++++++++++++++ docker-compose.yml | 1 + run.sh | 4 ++++ 3 files changed, 24 insertions(+) diff --git a/README.md b/README.md index 341205f..a37c6bb 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,25 @@ This is an adaptation of https://github.com/Overv/openstreetmap-tile-server/ for testing different cartoCss styles and generating tiles. +### Use with docker-compose + +#### Fresh install + +```bash +docker volume create osm-data +docker-compose build +``` + +For entering into the container, use the "terminal" argument of the run.sh script: + +```bash +docker-compose run --rm map terminal +``` + +#### Do an import + + + ## Original README diff --git a/docker-compose.yml b/docker-compose.yml index 684723c..318b127 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,7 @@ services: image: overv/openstreetmap-tile-server volumes: - osm-data:/data/database/ + - ./run.sh:/run.sh ports: - "8080:80" command: "run" diff --git a/run.sh b/run.sh index ddd9af9..6400f44 100755 --- a/run.sh +++ b/run.sh @@ -40,6 +40,10 @@ if [ ! -f /data/style/mapnik.xml ]; then carto ${NAME_MML:-project.mml} > mapnik.xml fi +if [ "$1" == "terminal" ]; then + bash +fi + if [ "$1" == "import" ]; then # Ensure that database directory is in right state mkdir -p /data/database/postgres/