diff --git a/Dockerfile b/Dockerfile index 1407f1a..33b9686 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ RUN npm ci COPY . ./ RUN npm run build -FROM nginx:alpine +FROM nginx COPY --from=build /app/dist /usr/share/nginx/html -COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY nginx.conf.template /etc/nginx/conf.d/default.conf.template +RUN echo "envsubst '$ESI_USER_AGENT' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && cat /etc/nginx/conf.d/default.conf" > /docker-entrypoint.d/40-envsubst.sh & chmod +x /docker-entrypoint.d/40-envsubst.sh diff --git a/nginx.conf b/nginx.conf.template similarity index 94% rename from nginx.conf rename to nginx.conf.template index 7d79c2a..0887be5 100644 --- a/nginx.conf +++ b/nginx.conf.template @@ -26,6 +26,6 @@ server { proxy_ssl_server_name on; proxy_set_header Host "esi.evetech.net"; proxy_set_header X-Forwarded-Proto https; - proxy_set_header User-Agent ${ESI_USER_AGENT}; + proxy_set_header User-Agent $ESI_USER_AGENT; } } \ No newline at end of file