Skip to content

Commit 437839e

Browse files
author
Rub21
committed
Replace domain script for nominatim
1 parent 90cca01 commit 437839e

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
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 & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
#!/bin/bash
22
export NOMINATIM_SETTINGS='/app/src/build/settings/local_api.php'
3-
4-
# Replace API URLs on files
5-
sed -i -e "s/www.openstreetmap.org/$OSMSEED_WEB_API_DOMAIN/g" /app/src/lib/lib.php
6-
sed -i -e "s/www.openstreetmap.org/$OSMSEED_WEB_API_DOMAIN/g" /app/src/utils/update.php
7-
sed -i -e "s/overpass-api.de/$OSMSEED_OVERPASS_API_DOMAIN/g" /app/src/utils/update.php
8-
93
# echo 'Setup the app'
104
# /app/src/build/utils/setup.php --setup-website
115

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

0 commit comments

Comments
 (0)