Skip to content
Snippets Groups Projects
Commit 04a7df47 authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

test envsubst

parent 2f75637a
Branches
Tags
1 merge request!942render page for linkedin
......@@ -33,6 +33,7 @@ build:
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker login ${CI_DEPENDENCY_PROXY_SERVER} -u ${CI_DEPENDENCY_PROXY_USER} -p ${CI_DEPENDENCY_PROXY_PASSWORD}
- envsubst < nginx/default.conf > nginx/default.conf
- docker build --pull -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" --build-arg DEPENDENCY_PROXY="$DEPENDENCY_PROXY" .
- docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
......@@ -48,6 +49,7 @@ build-tag:
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker login ${CI_DEPENDENCY_PROXY_SERVER} -u ${CI_DEPENDENCY_PROXY_USER} -p ${CI_DEPENDENCY_PROXY_PASSWORD}
- envsubst < nginx/default.conf > nginx/default.conf
- docker build --pull -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" --build-arg DEPENDENCY_PROXY="$DEPENDENCY_PROXY" .
- docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
......
......@@ -42,12 +42,14 @@ server {
# use regular expression for location to avoid nginx resolve error (https://stackoverflow.com/questions/57937222/502-bad-gateway-nginx-no-resolver-defined-to-resolve ) #
location ^~ /actualites/details/ {
resolver dns-default.openshift-dns.svc.cluster.local;
# proxy_set_header must be outside if clause (cf. https://stackoverflow.com/questions/16500594/why-i-cant-put-proxy-set-header-inside-an-if-clause )
proxy_set_header User-Agent "";
if ($prerender = 1) {
# For use of proxy_pass within a regular expression location, cf. https://stackoverflow.com/a/53354944
proxy_pass http://res-client-service.ns-res-d01-syn.svc.cluster.local:8080/api/render/$uri;
proxy_pass http://res-client-service.ns-res-$NAMESPACE_ENV-syn.svc.cluster.local:8080/api/render/$uri;
}
# if no prerender, apply default angular route
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment