Skip to content

Commit

Permalink
Enable livenessProbe for overpass
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Jan 5, 2024
1 parent 30514ae commit 4b39ad5
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 39 deletions.
56 changes: 28 additions & 28 deletions compose/osmcha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ services:
context: ../images/osmcha-web
dockerfile: Dockerfile
env_file:
- ../envs/.env.osmcha
- ../envs/.env.osmcha
volumes:
- ../data/osmcha/staticfiles:/staticfiles
- ../data/osmcha/staticfiles:/staticfiles
db:
platform: linux/amd64
image: osmseed-osmcha-db:v1
build:
context: ../images/osmcha-db
dockerfile: Dockerfile
ports:
- "5432:5432"
- "5432:5432"
volumes:
- ../data/osmcha-db-data:/var/lib/postgresql/data
- ../data/osmcha-db-data:/var/lib/postgresql/data
env_file:
- ../envs/.env.osmcha
- ../envs/.env.osmcha
init:
platform: linux/amd64
image: ghcr.io/willemarcel/osmcha-django:b1f4e6afc90e08707cadc4d74580632ca3b93dd2
Expand All @@ -34,27 +34,27 @@ services:
cp -r /app/staticfiles/* /staticfiles/static/
"
env_file:
- ../envs/.env.osmcha
- ../envs/.env.osmcha
volumes:
- ../data/osmcha/staticfiles:/staticfiles
# api:
# platform: linux/amd64
# image: developmentseed/osmseed-osmcha-api:v8
# build:
# context: ../images/osmcha-api
# dockerfile: Dockerfile
# command: >
# /bin/bash -c "
# set -x
# python manage.py collectstatic
# python manage.py migrate
# mkdir -p /staticfiles/static
# cp -r /app/staticfiles/* /staticfiles/static/
# gunicorn --workers 4 --bind 0.0.0.0:3000 --log-file - --access-logfile - config.wsgi
# "
# ports:
# - "3000:3000"
# env_file:
# - ../envs/.env.osmcha
# volumes:
# - ../data/osmcha/staticfiles:/staticfiles
- ../data/osmcha/staticfiles:/staticfiles
api:
platform: linux/amd64
image: ghcr.io/willemarcel/osmcha-django:b1f4e6afc90e08707cadc4d74580632ca3b93dd2
build:
context: ../images/osmcha-api
dockerfile: Dockerfile
command: >
/bin/bash -c "
set -x
python manage.py collectstatic
python manage.py migrate
mkdir -p /staticfiles/static
cp -r /app/staticfiles/* /staticfiles/static/
gunicorn --workers 4 --bind 0.0.0.0:5000 --log-file - --access-logfile - config.wsgi
"
ports:
- "5000:5000"
env_file:
- ../envs/.env.osmcha
volumes:
- ../data/osmcha/staticfiles:/staticfiles
15 changes: 6 additions & 9 deletions osm-seed/templates/overpass-api/overpass-api-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,16 @@ spec:
containers:
- name: {{ .Chart.Name }}-overpass-api
image: "{{ .Values.overpassApi.image.name }}:{{ .Values.overpassApi.image.tag }}"
# command: ["/bin/sh", "-c"]
# args: ["/app/docker-entrypoint.sh"]
ports:
- name: http
containerPort: 80
protocol: TCP
# livenessProbe:
# httpGet:
# path: /
# port: 80
# initialDelaySeconds: 600 # 10 min, because the compile process takes time.
# timeoutSeconds: 30
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 14400 # Normal update takes 2 hours aprrox, afther that start checking liveness
timeoutSeconds: 30
{{- if .Values.overpassApi.resources.enabled }}
resources:
requests:
Expand All @@ -48,7 +46,6 @@ spec:
cpu: {{ .Values.overpassApi.resources.limits.cpu }}
{{- end }}
env:
# overpass-api env variables
- name: OVERPASS_META
value: {{ .Values.overpassApi.env.OVERPASS_META | quote}}
- name: OVERPASS_MODE
Expand Down
3 changes: 1 addition & 2 deletions osm-seed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,7 @@ overpassApi:
OVERPASS_PLANET_URL: http://download.geofabrik.de/europe/monaco-latest.osm.bz2
OVERPASS_DIFF_URL: http://download.openstreetmap.fr/replication/europe/monaco/minute/
OVERPASS_RULES_LOAD: 10
#OVERPASS_PLANET_PREPROCESS: 'mv /db/planet.osm.bz2 /db/planet.osm.pbf && osmium cat -o /db/planet.osm.bz2 /db/planet.osm.pbf && rm /db/planet.osm.pbf' # it is in case we pass planet files as PBF file uncommment this line
OVERPASS_PLANET_PREPROCESS: "ls"
OVERPASS_PLANET_PREPROCESS: 'mv /db/planet.osm.bz2 /db/planet.osm.pbf && osmium cat -o /db/planet.osm.bz2 /db/planet.osm.pbf && rm /db/planet.osm.pbf'
OVERPASS_REPLICATION_SEQUENCE_NUMBER: 5201000
persistenceDisk:
enabled: false
Expand Down

0 comments on commit 4b39ad5

Please sign in to comment.