allow configuration of auth_proxy_pass through
environment variable
This commit is contained in:
parent
300abb5360
commit
520c20b4d8
@ -11,6 +11,7 @@ RUN npm run build
|
||||
FROM nginx:stable-alpine as production-stage
|
||||
COPY --from=build-stage /app/dist /app/eo-services
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY default.conf.template /etc/nginx/templates/default.conf.template
|
||||
COPY headers.js /etc/nginx/headers.js
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
23
default.conf.template
Normal file
23
default.conf.template
Normal file
@ -0,0 +1,23 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location /eo-services {
|
||||
mirror /mirror;
|
||||
root /app;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /eo-services/index.html;
|
||||
add_header Cache-Control 'no-store';
|
||||
}
|
||||
|
||||
location /mirror {
|
||||
internal;
|
||||
proxy_pass ${AUTH_PROXY_PASS};
|
||||
proxy_set_header X-Original-URI $request_uri;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
23
nginx.conf
23
nginx.conf
@ -28,27 +28,4 @@ http {
|
||||
access_log /var/log/nginx/access.log main;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location /eo-services {
|
||||
mirror /mirror;
|
||||
root /app;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /eo-services/index.html;
|
||||
add_header Cache-Control 'no-store';
|
||||
}
|
||||
|
||||
location /mirror {
|
||||
internal;
|
||||
proxy_pass https://eo-services.mortons.site/api/auth;
|
||||
proxy_set_header X-Original-URI $request_uri;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user