diff options
Diffstat (limited to 'packages/policy-gui-docker')
-rw-r--r-- | packages/policy-gui-docker/src/main/docker/Dockerfile | 25 | ||||
-rw-r--r-- | packages/policy-gui-docker/src/main/docker/etc/nginx/http.d/default.conf (renamed from packages/policy-gui-docker/src/main/docker/nginx/default.conf.template) | 2 | ||||
-rw-r--r-- | packages/policy-gui-docker/src/main/docker/etc/nginx/nginx.conf (renamed from packages/policy-gui-docker/src/main/docker/nginx/nginx.conf) | 0 | ||||
-rw-r--r-- | packages/policy-gui-docker/src/main/docker/index.html (renamed from packages/policy-gui-docker/src/main/docker/nginx/index.html) | 0 | ||||
-rw-r--r-- | packages/policy-gui-docker/src/main/docker/policy-gui.sh | 1 |
5 files changed, 9 insertions, 19 deletions
diff --git a/packages/policy-gui-docker/src/main/docker/Dockerfile b/packages/policy-gui-docker/src/main/docker/Dockerfile index 681a58d..0e8bcc2 100644 --- a/packages/policy-gui-docker/src/main/docker/Dockerfile +++ b/packages/policy-gui-docker/src/main/docker/Dockerfile @@ -26,30 +26,21 @@ ARG POLICY_LOGS=/var/log/onap/policy/gui ENV POLICY_LOGS=$POLICY_LOGS ENV POLICY_HOME=$POLICY_HOME/gui -ENV CLAMP_REST_URL=http://0.0.0.0 RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin $POLICY_HOME/lib && \ chown -R policy:policy $POLICY_HOME $POLICY_LOGS && \ apk update && \ - apk add --no-cache gettext nginx + apk add --no-cache nginx -WORKDIR $POLICY_HOME -COPY policy-gui.sh ./bin/ -COPY /maven/gui-editor-apex-uber.jar ./lib/ -COPY /maven/gui-pdp-monitoring-uber.jar ./lib/ -COPY etc/ssl/clamp.key /etc/ssl/clamp.key -COPY etc/ssl/clamp.pem /etc/ssl/clamp.pem -COPY nginx/nginx.conf /etc/nginx/nginx.conf -COPY nginx/default.conf.template /etc/nginx/templates/default.conf.template -COPY nginx/index.html /usr/share/nginx/html/ -ADD /maven/gui-clamp-html.tar.gz /usr/share/nginx/html/ -ADD /maven/gui-pdp-monitoring-html.tar.gz /usr/share/nginx/html/ -RUN rm /etc/nginx/conf.d/default.conf && \ - ln -sf /dev/stdout /var/log/nginx/access.log && \ +COPY --chown=policy:policy etc/ /etc/ +COPY --chown=policy:policy policy-gui.sh $POLICY_HOME/bin/ +COPY --chown=policy:policy /maven/*.jar $POLICY_HOME/lib/ +ADD --chown=policy:policy index.html /maven/*-html.tar.gz /usr/share/nginx/html/ +RUN ln -sf /dev/stdout /var/log/nginx/access.log && \ ln -sf /dev/stderr /var/log/nginx/error.log && \ touch /var/run/nginx.pid && \ - chown -R policy:policy . /etc/nginx /usr/share/nginx /var/lib/nginx /var/log/nginx /var/run/nginx.pid && \ - chmod 755 bin/*.sh + chown -R policy:policy /etc/nginx /usr/share/nginx /var/lib/nginx /var/log/nginx /var/run/nginx.pid && \ + chmod 755 $POLICY_HOME/bin/*.sh USER policy WORKDIR $POLICY_HOME/bin diff --git a/packages/policy-gui-docker/src/main/docker/nginx/default.conf.template b/packages/policy-gui-docker/src/main/docker/etc/nginx/http.d/default.conf index 9b3348a..2c589c4 100644 --- a/packages/policy-gui-docker/src/main/docker/nginx/default.conf.template +++ b/packages/policy-gui-docker/src/main/docker/etc/nginx/http.d/default.conf @@ -12,7 +12,7 @@ server { } location /clamp/restservices/clds/ { - proxy_pass ${CLAMP_REST_URL}/restservices/clds/; + proxy_pass https://policy-clamp-backend:8443/restservices/clds/; proxy_set_header X-SSL-Cert $ssl_client_escaped_cert; } diff --git a/packages/policy-gui-docker/src/main/docker/nginx/nginx.conf b/packages/policy-gui-docker/src/main/docker/etc/nginx/nginx.conf index aac9bb6..aac9bb6 100644 --- a/packages/policy-gui-docker/src/main/docker/nginx/nginx.conf +++ b/packages/policy-gui-docker/src/main/docker/etc/nginx/nginx.conf diff --git a/packages/policy-gui-docker/src/main/docker/nginx/index.html b/packages/policy-gui-docker/src/main/docker/index.html index 98742ae..98742ae 100644 --- a/packages/policy-gui-docker/src/main/docker/nginx/index.html +++ b/packages/policy-gui-docker/src/main/docker/index.html diff --git a/packages/policy-gui-docker/src/main/docker/policy-gui.sh b/packages/policy-gui-docker/src/main/docker/policy-gui.sh index bb2d9c9..050cbb7 100644 --- a/packages/policy-gui-docker/src/main/docker/policy-gui.sh +++ b/packages/policy-gui-docker/src/main/docker/policy-gui.sh @@ -30,7 +30,6 @@ echo "Starting gui-pdp-monitoring" $JAVA_HOME/bin/java -jar "$POLICY_HOME/lib/gui-pdp-monitoring-uber.jar" -p 17999 & echo "Starting nginx" -envsubst '${CLAMP_REST_URL}' < /etc/nginx/templates/default.conf.template > /etc/nginx/conf.d/default.conf nginx -g "daemon on;" wait |