Skip to content
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

ImpOSM update sequence #313

Merged
merged 7 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 31 additions & 26 deletions compose/tiler.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3'
version: '3.8'
services:
# ######################################################
# ### Tiler DB
Expand All @@ -9,11 +9,12 @@ services:
context: ../images/tiler-db
dockerfile: Dockerfile
ports:
- "5433:5432"
- "5433:5432"
volumes:
- ../data/tiler-db-data:/var/lib/postgresql/data
- ../data/tiler-db-data:/var/lib/postgresql/data
env_file:
- ../envs/.env.tiler-db
- ../envs/.env.tiler-db
restart: always
# ######################################################
# ### Tiler imposm for importing data
# ######################################################
Expand All @@ -23,18 +24,23 @@ services:
context: ../images/tiler-imposm
dockerfile: Dockerfile
volumes:
- ../data/tiler-imposm-data:/mnt/data
- ../data/tiler-imposm-data:/mnt/data
# - ../images/tiler-imposm:/osm
depends_on:
- tiler-db
command: >
/bin/bash -c "
echo starting imposm!;
sleep 1m;
./start.sh;
"
- tiler-db
command:
- sh
- -c
- "sleep 60 && ./start.sh"
env_file:
- ../envs/.env.tiler-db
- ../envs/.env.tiler-imposm
- ../envs/.env.tiler-db
- ../envs/.env.tiler-imposm
healthcheck:
test: ["CMD", "./liveness.sh"]
interval: 30s
timeout: 10s
retries: 3
restart: always
# ######################################################
# ### Tiler imposm for importing data
# ######################################################
Expand All @@ -44,18 +50,17 @@ services:
context: ../images/tiler-server
dockerfile: Dockerfile
volumes:
- ../data/tiler-server-data:/mnt/data
- ../data/tiler-server-data:/mnt/data
depends_on:
- tiler-db
- tiler-imposm
- tiler-db
- tiler-imposm
ports:
- "9090:9090"
command: >
/bin/bash -c "
echo Starting tiles server!;
sleep 2m;
./start.sh;
"
- "9090:9090"
command:
- sh
- -c
- "sleep 60 && ./start.sh"
env_file:
- ../envs/.env.tiler-db
- ../envs/.env.tiler-server
- ../envs/.env.tiler-db
- ../envs/.env.tiler-server
restart: always
10 changes: 5 additions & 5 deletions images/tiler-imposm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ RUN apt-get install -y \
curl \
wget \
unzip \
software-properties-common
software-properties-common && \
rm -rf /var/lib/apt/lists/*

# # Install python
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y build-essential python3.6 python3.6-dev python3-pip && \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install pip --upgrade && \
python3 -m pip install wheel

Expand Down Expand Up @@ -53,7 +55,5 @@ WORKDIR $IMPOSMDATA
VOLUME $IMPOSMDATA

WORKDIR /osm
COPY config config
COPY scripts scripts
COPY start.sh start.sh
CMD ./start.sh
COPY . .
CMD ./start.sh
8 changes: 8 additions & 0 deletions images/tiler-imposm/liveness.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
if ps aux | grep -v grep | grep "imposm" >/dev/null; then
echo "imposm process is running."
exit 0
else
echo "imposm process is not running." 1>&2
exit 1
fi
Loading
Loading