diff --git a/client/Dockerfile b/client/Dockerfile index dcfff60..8ed4baf 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -22,6 +22,8 @@ RUN NODE_OPTIONS="--max-old-space-size=5250" VITE_OTEL_EXPORTER_OTLP_TRACES_ENDP FROM nginx:1.29.1-bookworm AS serve COPY --from=build /app/build /usr/share/nginx/html -COPY nginx.conf /etc/nginx/conf.d/default.conf +ENV NGINX_ENTRYPOINT_LOCAL_RESOLVERS=1 +ENV NGINX_ENVSUBST_FILTER=NGINX_ +COPY nginx.conf /etc/nginx/templates/default.conf.template EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] diff --git a/client/nginx.conf b/client/nginx.conf index 968648f..84a1ade 100644 --- a/client/nginx.conf +++ b/client/nginx.conf @@ -3,7 +3,8 @@ server { root /usr/share/nginx/html; index index.html; - resolver 127.0.0.11 valid=30s; + # Populated at container start from /etc/resolv.conf. + resolver ${NGINX_LOCAL_RESOLVERS} valid=30s ipv6=off; set $backend "http://server:8080"; location ^~ /api/ {