From 166ffe48641fc682f7743761477adf22195a8248 Mon Sep 17 00:00:00 2001 From: fly Date: Tue, 16 Mar 2021 23:59:51 +0100 Subject: [PATCH] Working condition Signed-off-by: fly --- README.md | 12 +++++++++++- full/Dockerfile | 15 ++++++++++----- full/general-settings | 2 +- postgres/Dockerfile | 3 --- 4 files changed, 22 insertions(+), 10 deletions(-) delete mode 100644 postgres/Dockerfile diff --git a/README.md b/README.md index 8f83a1b..677061c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ # easy-osm2city-podman -Repo for containerisation of easy-osm2city \ No newline at end of file +Repo for containerisation of easy-osm2city + +## Networking +`podman network create o2c` + +## Psql +`podman run -i -d -t --name o2c-psql --network o2c -v /storage/databases/postgresql/13/main/:/var/lib/postgresql/data/ -e POSTGRES_PASSWORD=FG-is-GREAT docker.io/postgis/postgis:13-master` + +## Osm2city container +`podman run -i -t -d -v :/scenery/ -v :/easy-osm2city/pbf -v :/easy-osm2city/projects -v :/tmp --name o2c --network o2c registry.gitlab.com/merspieler/easy-osm2city/full:latest` +We need to have `/tmp` on a volume cause we otherwise get issues with performance. diff --git a/full/Dockerfile b/full/Dockerfile index dd7723b..12abe03 100644 --- a/full/Dockerfile +++ b/full/Dockerfile @@ -1,18 +1,23 @@ -FROM debian:stable +FROM debian:buster + +RUN apt-get -y update && apt-get install -y git osmium-tool osmosis postgis pgadmin3 postgresql-contrib postgresql-client postgresql-postgis postgresql python3-pip python3-venv python3-dev curl sudo flightgear tmux vim wget + +RUN pip3 install requests -RUN apt-get -y update && apt-get install -y git osmium-tool osmosis postgis pgadmin3 postgresql-contrib postgresql-client postgresql-postgis postgresql python-pip python3-venv python3-dev curl sudo flightgear RUN git clone https://gitlab.com/merspieler/easy-osm2city.git WORKDIR /easy-osm2city +COPY general-settings . # Do some things from the install script manually RUN git clone https://gitlab.com/merspieler/osm2city-scripts.git scripts RUN git clone https://gitlab.com/osm2city/osm2city.git RUN git clone https://gitlab.com/osm2city/osm2city-data.git -RUN mkdir -p pbf && mkdir -p projects +RUN mkdir -p pbf && mkdir -p projects && mkdir -p /scenery RUN ./create-venv - -ENTRYPOINT sleep 10000000000 +VOLUME /scenery +VOLUME /easy-osm2city/projects +VOLUME /easy-osm2city/pbf diff --git a/full/general-settings b/full/general-settings index cc125d7..06a7249 100644 --- a/full/general-settings +++ b/full/general-settings @@ -10,7 +10,7 @@ threads=4 fg_elev=/usr/games/fgelev fg_scenery=/scenery -db_host=localhost +db_host=o2c-psql db_port=5432 db_user=osm db_passwd="FG-is-GREAT" diff --git a/postgres/Dockerfile b/postgres/Dockerfile deleted file mode 100644 index 3cec84d..0000000 --- a/postgres/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM postgres:12.4 - -RUN apt-get update && apt-get install -y postgresql-12-postgis-3 pgadmin3 postgis postgresql-contrib && apt-get clean