diff options
Diffstat (limited to 'components/datalake-handler/admin')
-rw-r--r-- | components/datalake-handler/admin/Dockerfile | 14 | ||||
-rw-r--r-- | components/datalake-handler/admin/nginx/dl-admin-nginx.conf | 6 | ||||
-rw-r--r-- | components/datalake-handler/admin/pom.xml | 2 |
3 files changed, 16 insertions, 6 deletions
diff --git a/components/datalake-handler/admin/Dockerfile b/components/datalake-handler/admin/Dockerfile index 95af88a5..38c50a65 100644 --- a/components/datalake-handler/admin/Dockerfile +++ b/components/datalake-handler/admin/Dockerfile @@ -11,13 +11,21 @@ RUN npm install && \ npm run build -FROM nginx:1.15.12 +FROM nginx:1.17.9 RUN apt-get update && \ - apt-get install -y dnsmasq + apt-get install -y dnsmasq RUN echo "\n\n# Docker extra config \nuser=root\naddn-hosts=/etc/hosts\n" >> /etc/dnsmasq.conf COPY --from=builder /app/dist/* /usr/share/nginx/html/ COPY --from=builder /app/dl-admin-nginx.conf /etc/nginx/conf.d/default.conf -CMD service dnsmasq restart && nginx -g "daemon off;" +CMD echo "domain-needed" >> /etc/dnsmasq.conf && \ + echo "resolv-file=/etc/resolv.conf" >> /etc/dnsmasq.conf && \ + echo "expand-hosts" >> /etc/dnsmasq.conf && \ + echo "listen-address=127.0.0.1" >> /etc/dnsmasq.conf && \ + service dnsmasq restart && \ + echo set \$upstreamName http://dl-feeder.`grep search /etc/resolv.conf | awk {'print $2'}`:1680/datalake/v1\$1\$is_args\$args\; > /etc/nginx/upstream.conf && \ + nginx -g "daemon off;" + +#CMD ["sh", "-c", "tail -f /dev/null"] diff --git a/components/datalake-handler/admin/nginx/dl-admin-nginx.conf b/components/datalake-handler/admin/nginx/dl-admin-nginx.conf index 9551a1db..b6caa609 100644 --- a/components/datalake-handler/admin/nginx/dl-admin-nginx.conf +++ b/components/datalake-handler/admin/nginx/dl-admin-nginx.conf @@ -2,9 +2,10 @@ server { listen 80; root /usr/share/nginx/html; + resolver 127.0.0.1 valid=10s; location ~/datalake/v1(.*)$ { - resolver 127.0.0.1 valid=10s; - set $upstreamName http://dl-feeder:1680/datalake/v1$1; + #set $upstreamName http://dl_feeder:1680/datalake/v1$1; + include /etc/nginx/upstream.conf; proxy_pass $upstreamName; proxy_ssl_server_name on; @@ -16,3 +17,4 @@ server { proxy_set_header X-Forwarded-Host $server_name; } } + diff --git a/components/datalake-handler/admin/pom.xml b/components/datalake-handler/admin/pom.xml index cd6e3e8a..5325ba9e 100644 --- a/components/datalake-handler/admin/pom.xml +++ b/components/datalake-handler/admin/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>org.onap.dcaegen2.services.components</groupId> <artifactId>datalake-handler</artifactId> - <version>1.0.0-SNAPSHOT</version> + <version>1.0.1-SNAPSHOT</version> </parent> <groupId>org.onap.dcaegen2.services.components.datalake-handler</groupId> |