Skip to content

Commit c103cc9

Browse files
committed
Cleanup CI and documentation files
- Remove deprecated ".php" suffix from API calls, especially in ci.yml - Replace links to http://download.geofabrik.de with https - Remove trailing spaces - Add missing backslashes in example.md - Minor text revisions
1 parent 8fbaadb commit c103cc9

3 files changed

Lines changed: 105 additions & 105 deletions

File tree

.github/workflows/ci.yml

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
context: .
3030
tags: nominatim:${{ steps.get_version.outputs.NOMINATIM_VERSION }}
3131
outputs: type=docker,dest=/tmp/nominatim.tar
32-
32+
3333
- name: Upload artifact
3434
uses: actions/upload-artifact@v4
3535
with:
@@ -51,74 +51,74 @@ jobs:
5151
# get the data from four days ago to make sure there really are updates to apply
5252
four_days_ago=`date --date="4 days ago" +%y%m%d`
5353
docker run -i --rm \
54-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-${four_days_ago}.osm.pbf \
55-
-e REPLICATION_URL=http://download.geofabrik.de/europe/monaco-updates/ \
54+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-${four_days_ago}.osm.pbf \
55+
-e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \
5656
-p 8001:8080 \
5757
--name nominatim \
5858
nominatim:$NOMINATIM_VERSION &
5959
60-
./assert-non-empty-json "http://localhost:8001/search.php?q=avenue%20pasteur"
60+
./assert-non-empty-json "http://localhost:8001/search?q=avenue%20pasteur"
6161
docker exec -i nominatim sudo -u nominatim nominatim replication --project-dir /nominatim --once
62-
./assert-non-empty-json "http://localhost:8001/search.php?q=avenue%20pasteur"
63-
62+
./assert-non-empty-json "http://localhost:8001/search?q=avenue%20pasteur"
63+
6464
- name: Import with volume mount
6565
commands: |-
6666
docker run -i --rm \
67-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
68-
-e REPLICATION_URL=http://download.geofabrik.de/europe/monaco-updates/ \
67+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
68+
-e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \
6969
-v nominatim-data:/var/lib/postgresql/16/main \
7070
-p 8002:8080 \
7171
nominatim:$NOMINATIM_VERSION &
7272
73-
./assert-non-empty-json "http://localhost:8002/search.php?q=avenue%20pasteur"
74-
73+
./assert-non-empty-json "http://localhost:8002/search?q=avenue%20pasteur"
74+
7575
- name: Import with bind-mount, container restart & update
7676
commands: |-
7777
# get the data from four days ago to make sure there really are updates to apply
7878
four_days_ago=`date --date="4 days ago" +%y%m%d`
7979
docker run -i --rm \
80-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-${four_days_ago}.osm.pbf \
81-
-e REPLICATION_URL=http://download.geofabrik.de/europe/monaco-updates/ \
80+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-${four_days_ago}.osm.pbf \
81+
-e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \
8282
-v /tmp/nominatim-data:/var/lib/postgresql/16/main \
8383
-p 8003:8080 \
8484
--name nominatim \
8585
nominatim:$NOMINATIM_VERSION &
8686
87-
./assert-non-empty-json "http://localhost:8003/search.php?q=avenue%20pasteur"
88-
87+
./assert-non-empty-json "http://localhost:8003/search?q=avenue%20pasteur"
88+
8989
# Stop container
9090
docker stop nominatim
9191
# the container needs a few seconds to shutdown cleanly apparently
9292
sleep 15
9393
9494
# import to bind mount is done previously
9595
docker run -i --rm \
96-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-${four_days_ago}.osm.pbf \
97-
-e REPLICATION_URL=http://download.geofabrik.de/europe/monaco-updates/ \
96+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-${four_days_ago}.osm.pbf \
97+
-e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \
9898
-v /tmp/nominatim-data:/var/lib/postgresql/16/main \
9999
-p 8004:8080 \
100100
--name nominatim \
101101
nominatim:$NOMINATIM_VERSION &
102102
103-
./assert-non-empty-json "http://localhost:8004/search.php?q=avenue%20pasteur"
103+
./assert-non-empty-json "http://localhost:8004/search?q=avenue%20pasteur"
104104
docker exec -i nominatim sudo -u nominatim nominatim replication --project-dir /nominatim --once
105-
106-
./assert-non-empty-json "http://localhost:8004/search.php?q=avenue%20pasteur"
105+
106+
./assert-non-empty-json "http://localhost:8004/search?q=avenue%20pasteur"
107107
108108
- name: UPDATE_MODE=once with volume
109109
commands: |-
110110
# get the data from four days ago to make sure there really are updates to apply
111111
four_days_ago=`date --date="4 days ago" +%y%m%d`
112112
docker run -i --rm \
113-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-${four_days_ago}.osm.pbf \
114-
-e REPLICATION_URL=http://download.geofabrik.de/europe/monaco-updates/ \
113+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-${four_days_ago}.osm.pbf \
114+
-e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \
115115
-e UPDATE_MODE=once \
116116
-v nominatim-update-volume:/var/lib/postgresql/16/main \
117117
-p 8004:8080 \
118118
--name nominatim \
119119
nominatim:$NOMINATIM_VERSION &
120120
121-
./assert-non-empty-json "http://localhost:8004/search.php?q=avenue%20pasteur"
121+
./assert-non-empty-json "http://localhost:8004/search?q=avenue%20pasteur"
122122
echo -n "check replication log for Update completed. Count:"
123123
docker exec nominatim /bin/bash -c 'tail -f /var/log/replication.log | grep -m 1 -c "Update completed." '
124124
@@ -127,72 +127,72 @@ jobs:
127127
# get the data from few days ago to make sure there really are updates to apply
128128
days_ago=`date --date="4 days ago" +%y%m%d`
129129
docker run -i --rm \
130-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-${days_ago}.osm.pbf \
131-
-e REPLICATION_URL=http://download.geofabrik.de/europe/monaco-updates/ \
130+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-${days_ago}.osm.pbf \
131+
-e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \
132132
-e UPDATE_MODE=continuous \
133133
-v /tmp/nominatim-update-bindmount:/var/lib/postgresql/16/main \
134134
-p 8004:8080 \
135135
--name nominatim \
136136
nominatim:$NOMINATIM_VERSION &
137137
138-
./assert-non-empty-json "http://localhost:8004/search.php?q=avenue%20pasteur"
138+
./assert-non-empty-json "http://localhost:8004/search?q=avenue%20pasteur"
139139
echo -n "check replication log for Update completed. Count:"
140140
docker exec nominatim /bin/bash -c 'tail -f /var/log/replication.log | grep -m 1 -c "Update completed." '
141-
141+
142142
- name: Import full style
143143
commands: |-
144144
docker run -i --rm \
145-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
146-
-e REPLICATION_URL=http://download.geofabrik.de/europe/monaco-updates/ \
145+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
146+
-e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \
147147
-e IMPORT_STYLE=full \
148148
-p 8005:8080 \
149149
nominatim:$NOMINATIM_VERSION &
150150
151-
./assert-non-empty-json "http://localhost:8005/search.php?q=hotel%20de%20paris"
152-
151+
./assert-non-empty-json "http://localhost:8005/search?q=hotel%20de%20paris"
152+
153153
- name: Import admin style
154154
commands: |-
155155
docker run -i --rm \
156-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
157-
-e REPLICATION_URL=http://download.geofabrik.de/europe/monaco-updates/ \
156+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
157+
-e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \
158158
-e IMPORT_STYLE=admin \
159159
-p 8006:8080 \
160160
nominatim:$NOMINATIM_VERSION &
161161
162-
./assert-empty-json "http://localhost:8006/search.php?q=hotel%20de%20paris"
162+
./assert-empty-json "http://localhost:8006/search?q=hotel%20de%20paris"
163163
164164
- name: Import with PBF_PATH
165165
commands: |-
166-
wget --cut-dirs=1 -nH -xP /tmp/data http://download.geofabrik.de/europe/monaco-latest.osm.pbf
166+
wget --cut-dirs=1 -nH -xP /tmp/data https://download.geofabrik.de/europe/monaco-latest.osm.pbf
167167
docker run -i --rm \
168168
-e PBF_PATH=/nominatim/data/monaco-latest.osm.pbf \
169-
-e REPLICATION_URL=http://download.geofabrik.de/europe/monaco-updates/ \
169+
-e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \
170170
-v nominatim7-data:/var/lib/postgresql/16/main \
171171
-v /tmp/data:/nominatim/data \
172172
-p 8007:8080 \
173173
--name nominatim \
174174
nominatim:$NOMINATIM_VERSION &
175175
176-
./assert-non-empty-json "http://localhost:8007/search.php?q=avenue%20pasteur"
176+
./assert-non-empty-json "http://localhost:8007/search?q=avenue%20pasteur"
177177
178178
- name: REPLICATION_URL is blank
179179
commands: |-
180180
docker run -i --rm \
181-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
181+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
182182
-p 8008:8080 \
183183
nominatim:$NOMINATIM_VERSION &
184184
185-
./assert-non-empty-json "http://localhost:8008/search.php?q=avenue%20pasteur"
185+
./assert-non-empty-json "http://localhost:8008/search?q=avenue%20pasteur"
186186
187187
- name: FREEZE
188188
commands: |-
189189
docker run -i --rm \
190-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
190+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
191191
-e FREEZE="true" \
192192
-p 8009:8080 \
193193
nominatim:$NOMINATIM_VERSION &
194194
195-
./assert-non-empty-json "http://localhost:8009/search.php?q=avenue%20pasteur"
195+
./assert-non-empty-json "http://localhost:8009/search?q=avenue%20pasteur"
196196
197197
- name: GB postcode import
198198
commands: |-
@@ -202,29 +202,29 @@ jobs:
202202
-p 8010:8080 \
203203
nominatim:$NOMINATIM_VERSION &
204204
205-
./assert-non-empty-json "http://localhost:8010/search.php?postalcode=LE15+8TX"
206-
./assert-non-empty-json "http://localhost:8010/search.php?postalcode=PE9+3SY"
207-
./assert-non-empty-json "http://localhost:8010/search.php?postalcode=PE9+4ES"
208-
205+
./assert-non-empty-json "http://localhost:8010/search?postalcode=LE15+8TX"
206+
./assert-non-empty-json "http://localhost:8010/search?postalcode=PE9+3SY"
207+
./assert-non-empty-json "http://localhost:8010/search?postalcode=PE9+4ES"
208+
209209
- name: REVERSE_ONLY
210210
commands: |-
211211
docker run -i --rm \
212-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
212+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
213213
-e REVERSE_ONLY="true" \
214214
-p 8011:8080 \
215215
nominatim:$NOMINATIM_VERSION &
216216
217-
./assert-non-empty-json "http://localhost:8011/reverse.php?lat=43.734&lon=7.42&format=jsonv2"
218-
217+
./assert-non-empty-json "http://localhost:8011/reverse?lat=43.734&lon=7.42&format=jsonv2"
218+
219219
- name: Check for clean shutdown
220220
commands: |-
221221
docker run --detach --rm \
222-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
222+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
223223
-p 8009:8080 \
224224
--name nominatim \
225225
nominatim:$NOMINATIM_VERSION
226-
227-
./assert-non-empty-json "http://localhost:8009/search.php?q=avenue%20pasteur"
226+
227+
./assert-non-empty-json "http://localhost:8009/search?q=avenue%20pasteur"
228228
# Shutdown the container
229229
docker stop -t 60 nominatim
230230
# Verify that the exit code is zero
@@ -234,27 +234,27 @@ jobs:
234234
- name: WARMUP_ON_STARTUP=true
235235
commands: |-
236236
docker run -i --rm \
237-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
237+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
238238
-e WARMUP_ON_STARTUP=true \
239239
-p 8012:8080 \
240240
--name nominatim \
241241
nominatim:$NOMINATIM_VERSION &
242242
243-
./assert-non-empty-json "http://localhost:8012/search.php?q=avenue%20pasteur"
243+
./assert-non-empty-json "http://localhost:8012/search?q=avenue%20pasteur"
244244
docker logs nominatim | grep "Warming finished"
245245
246246
- name: WARMUP_ON_STARTUP=false
247247
commands: |-
248248
docker run -i --rm \
249-
-e PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
249+
-e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
250250
-e WARMUP_ON_STARTUP=false \
251251
-p 8013:8080 \
252252
--name nominatim \
253253
nominatim:$NOMINATIM_VERSION &
254254
255-
./assert-non-empty-json "http://localhost:8013/search.php?q=avenue%20pasteur"
255+
./assert-non-empty-json "http://localhost:8013/search?q=avenue%20pasteur"
256256
docker logs nominatim | grep "Skipping cache warmup"
257-
257+
258258
steps:
259259
- name: Download artifact
260260
uses: actions/download-artifact@v4
@@ -272,16 +272,16 @@ jobs:
272272
- name: ${{ matrix.test_scenario.name }}
273273
working-directory: .github/workflows
274274
run: ${{ matrix.test_scenario.commands }}
275-
275+
276276
publish:
277277
name: Publish docker image
278278
needs: test
279-
runs-on: ubuntu-latest
280-
279+
runs-on: ubuntu-latest
280+
281281
steps:
282282
- name: Checkout
283283
uses: actions/checkout@v4
284-
284+
285285
- name: Extract Nominatim Version
286286
id: get_version
287287
run: |
@@ -295,12 +295,12 @@ jobs:
295295
with:
296296
# List of Docker images to use as base name for tags
297297
images: |
298-
mediagis/nominatim
299-
298+
mediagis/nominatim
299+
300300
# Disable generation of latest tag
301301
flavor: |
302302
latest=false
303-
303+
304304
# Add simple tag with nominatim version + tag with custom date format
305305
tags: |
306306
type=raw,value=${{ steps.get_version.outputs.NOMINATIM_VERSION }}
@@ -317,7 +317,7 @@ jobs:
317317
with:
318318
username: ${{ secrets.DOCKERHUB_USERNAME }}
319319
password: ${{ secrets.DOCKERHUB_TOKEN }}
320-
320+
321321
- name: Build and push
322322
uses: docker/build-push-action@v5
323323
with:

0 commit comments

Comments
 (0)