File tree 3 files changed +13
-9
lines changed
3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 1
1
FROM nginxinc/nginx-unprivileged:stable-alpine-slim
2
+ # These must be set when building for ung-sak-web. Defaults are for k9-sak-web
3
+ ARG proxyConfig=proxy.nginx
4
+ ARG featureToggles=feature-toggles.json
5
+ ARG appVariant=k9
2
6
3
7
LABEL org.opencontainers.image.source=https://github.com/navikt/k9-sak-web
4
8
5
- ADD proxy.nginx /etc/nginx/conf.d/app.conf.template
6
- ADD feature-toggles.json /etc/nginx/conf.d/feature-toggles.json
9
+ ADD $proxyConfig /etc/nginx/conf.d/app.conf.template
10
+ ADD $featureToggles /etc/nginx/conf.d/feature-toggles.json
7
11
ADD start-server.sh /start-server.sh
8
12
9
13
ENV APP_DIR="/app" \
10
- APP_PATH_PREFIX="/k9 /sak" \
11
- APP_CALLBACK_PATH="/k9 /sak/cb" \
12
- APP_URL_SAK="http://k9 -sak"
14
+ APP_PATH_PREFIX="/$appVariant /sak" \
15
+ APP_CALLBACK_PATH="/$appVariant /sak/cb" \
16
+ APP_URL_SAK="http://$appVariant -sak"
13
17
14
18
COPY dist /usr/share/nginx/html
15
19
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ server {
44
44
# Health check for NAIS
45
45
location = /k9/feature-toggle/toggles.json {
46
46
add_header Content-Type application/json;
47
- root /tmp/;
47
+ alias /tmp/feature-toggle/toggles.json ;
48
48
}
49
49
50
50
location = /isAlive {
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ _shutdown_() {
12
12
wait " $pid "
13
13
}
14
14
trap _shutdown_ SIGTERM
15
- [ -d /tmp/k9/ feature-toggle ] && echo " Feature toggle-directory finnes fra før, tilbakestiller" && rm -r /tmp/k9/ feature-toggle/* || mkdir -p /tmp/k9 /feature-toggle
16
- envsubst < /etc/nginx/conf.d/feature-toggles.json > /tmp/k9/ feature-toggle/toggles.json
15
+ [ -d /tmp/feature-toggle ] && echo " Feature toggle-directory finnes fra før, tilbakestiller" && rm -r /tmp/feature-toggle/* || mkdir -p /tmp/feature-toggle
16
+ envsubst < /etc/nginx/conf.d/feature-toggles.json > /tmp/feature-toggle/toggles.json
17
17
18
18
export APP_HOSTNAME=" ${HOSTNAME:- localhost} "
19
19
export APP_PORT=" ${APP_PORT:- 443} "
@@ -26,7 +26,7 @@ echo "### Nginx conf ###"
26
26
cat /etc/nginx/conf.d/default.conf
27
27
echo
28
28
echo " ### Feature toggles ###"
29
- cat /tmp/k9/ feature-toggle/toggles.json
29
+ cat /tmp/feature-toggle/toggles.json
30
30
31
31
nginx -g " daemon off;" &
32
32
pid=$!
You can’t perform that action at this time.
0 commit comments