Skip to content

Commit 8d40162

Browse files
authored
Merge pull request #217 from HSLdevcom/rauma-external
Add rauma external endpoints
2 parents eee8ee8 + 059352a commit 8d40162

File tree

5 files changed

+32
-3
lines changed

5 files changed

+32
-3
lines changed

.github/workflows/dev-pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- master
99
jobs:
1010
test:
11-
runs-on: ubuntu-18.04
11+
runs-on: ubuntu-22.04
1212
strategy:
1313
matrix:
1414
node-version: [10.x]
@@ -27,7 +27,7 @@ jobs:
2727
if: github.ref == 'refs/heads/master'
2828
needs:
2929
- test
30-
runs-on: ubuntu-18.04
30+
runs-on: ubuntu-22.04
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@v2

.github/workflows/prod-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- published
66
jobs:
77
prod-push:
8-
runs-on: ubuntu-18.04
8+
runs-on: ubuntu-22.04
99
steps:
1010
- name: Checkout
1111
uses: actions/checkout@v2

external.conf

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,32 @@ location /out/kajaani.mattersoft.fi/ {
290290
proxy_set_header Authorization KAJAANI_BASIC_AUTH;
291291
}
292292

293+
#rauma gtfs rt (https://rauma.mattersoft.fi/api/gtfsrealtime/v1.0/feed/tripupdate, servicealert and vehicleposition)
294+
location /out/rauma.mattersoft.fi/ {
295+
proxy_pass https://rauma.mattersoft.fi/;
296+
include allowed-ips.conf;
297+
proxy_cache ext_cache;
298+
proxy_cache_valid 200 30s;
299+
proxy_cache_lock on;
300+
add_header X-Proxy-Cache $upstream_cache_status;
301+
proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
302+
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
303+
proxy_set_header Authorization RAUMA_RT_BASIC_AUTH;
304+
}
305+
306+
#rauma gtfs (https://raumaadmin.mattersoft.fi/feeds/233.zip)
307+
location /out/raumaadmin.mattersoft.fi/ {
308+
proxy_pass https://raumaadmin.mattersoft.fi/;
309+
include allowed-ips.conf;
310+
proxy_cache ext_cache;
311+
proxy_cache_valid 200 30s;
312+
proxy_cache_lock on;
313+
add_header X-Proxy-Cache $upstream_cache_status;
314+
proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
315+
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
316+
proxy_set_header Authorization RAUMA_STATIC_BASIC_AUTH;
317+
}
318+
293319
#perille gtfs
294320
location /out/gtfs.perille.fi/ {
295321
proxy_pass https://gtfs.perille.fi/;

run.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ sed -i "s/ROVANIEMI_BASIC_AUTH/${ROVANIEMI_BASIC_AUTH}/" /etc/nginx/external.con
2626
sed -i "s/KAJAANI_BASIC_AUTH/${KAJAANI_BASIC_AUTH}/" /etc/nginx/external.conf
2727
sed -i "s/GIRAVOLTA_VANTAA_AUTH/${GIRAVOLTA_VANTAA_AUTH}/" /etc/nginx/external.conf
2828
sed -i "s/VARELY_BASIC_AUTH/${VARELY_BASIC_AUTH}/" /etc/nginx/external.conf
29+
sed -i "s/RAUMA_RT_BASIC_AUTH/${RAUMA_RT_BASIC_AUTH}/" /etc/nginx/external.conf
30+
sed -i "s/RAUMA_STATIC_BASIC_AUTH/${RAUMA_STATIC_BASIC_AUTH}/" /etc/nginx/external.conf
2931

3032
#start nginx
3133
nginx

test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ CONTAINER_ID=$(docker run -d -p 9000:8080 $ADDHOSTS -e VILKKU_BASIC_AUTH="\"test
2323
-e KOUVOLA_BASIC_AUTH="\"test\"" -e PERILLE_BASIC_AUTH="\"test\"" -e KAJAANI_BASIC_AUTH="\"test\"" \
2424
-e GIRAVOLTA_TAMPERE_AUTH="\"test\"" -e KOTKA_BASIC_AUTH="\"test\"" \
2525
-e GIRAVOLTA_VANTAA_AUTH="\"test\"" -e VARELY_BASIC_AUTH="\"test\"" \
26+
-e RAUMA_RT_BASIC_AUTH="\"test\"" -e RAUMA_STATIC_BASIC_AUTH="\"test\"" \
2627
hsldevcom/digitransit-proxy:integrationtest)
2728

2829
curl -v http://127.0.0.1:9000

0 commit comments

Comments
 (0)