Skip to content

Commit 17b60dd

Browse files
author
Rub21
committed
Merge branch 'develop' into update/docs_envs
2 parents ccb16ec + 44720cd commit 17b60dd

File tree

7 files changed

+23
-2
lines changed

7 files changed

+23
-2
lines changed

images/nominatim/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ COPY startapache.sh /app/startapache.sh
142142
COPY startpostgres.sh /app/startpostgres.sh
143143
COPY update.sh /app/update.sh
144144
COPY start.sh /app/start.sh
145+
COPY replace_domain.sh /app/replace_domain.sh
145146

146147
# Collapse image to single layer.
147148
FROM scratch

images/nominatim/replace_domain.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# Replace API URLs on files
3+
sed -i -e "s/www.openstreetmap.org/$OSMSEED_WEB_API_DOMAIN/g" /app/src/lib/lib.php
4+
sed -i -e "s/www.openstreetmap.org/$OSMSEED_WEB_API_DOMAIN/g" /app/src/utils/update.php
5+
sed -i -e "s/overpass-api.de/$OSMSEED_OVERPASS_API_DOMAIN/g" /app/src/utils/update.php

images/nominatim/start.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
# Replace domains
4+
./replace_domain.sh
5+
36
echo 'Starting init...'
47
sh /app/init.sh
58
echo 'Starting database and updates...'

images/nominatim/startapache.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/bash
22
export NOMINATIM_SETTINGS='/app/src/build/settings/local_api.php'
3-
43
# echo 'Setup the app'
54
# /app/src/build/utils/setup.php --setup-website
65

6+
# Replace domains
7+
./replace_domain.sh
8+
79
flag=true
810
while "$flag" = true; do
911
pg_isready -h $PG_HOST -p $PG_PORT >/dev/null 2>&2 || continue

osm-seed/templates/nominatim-api-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ spec:
5959
value: {{ .Values.nominatimDb.env.PG_USER }}
6060
- name: PG_PORT
6161
value: {{ .Values.nominatimDb.env.PG_PORT | quote }}
62+
- name: OSMSEED_WEB_API_DOMAIN
63+
value: {{ .Values.nominatimApi.env.OSMSEED_WEB_API_DOMAIN }}
64+
- name: OSMSEED_OVERPASS_API_DOMAIN
65+
value: {{ .Values.nominatimApi.env.OSMSEED_OVERPASS_API_DOMAIN }}
6266
{{- if .Values.nominatimApi.nodeSelector.enabled }}
6367
nodeSelector:
6468
{{ .Values.nominatimApi.nodeSelector.label_key }} : {{ .Values.nominatimApi.nodeSelector.label_value }}

osm-seed/templates/nominatim-db-statefulset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ spec:
5959
value: {{ .Values.nominatimDb.persistenceDisk.mountPath }}
6060
- name: POD_IP
6161
valueFrom: { fieldRef: { fieldPath: status.podIP } }
62+
- name: OSMSEED_WEB_API_DOMAIN
63+
value: {{ .Values.nominatimApi.env.OSMSEED_WEB_API_DOMAIN }}
64+
- name: OSMSEED_OVERPASS_API_DOMAIN
65+
value: {{ .Values.nominatimApi.env.OSMSEED_OVERPASS_API_DOMAIN }}
6266
command: ["/bin/sh"]
6367
args: ["-c", "sh /app/start.sh"]
6468
# livenessProbe:

osm-seed/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,9 @@ nominatimApi:
528528
enabled: true
529529
replicaCount: 1
530530
env:
531-
BASE_URL: 'https://nominatim.osm-seed.test'
531+
BASE_URL: https://nominatim.osm-seed.test
532+
OSMSEED_WEB_API_DOMAIN: osmseed.org
533+
OSMSEED_OVERPASS_API_DOMAIN: overpass-api.osmseed.org
532534
resources:
533535
enabled: false
534536
requests:

0 commit comments

Comments
 (0)