fix(docker): harden frontend runtime config

This commit is contained in:
2026-07-11 22:03:24 +02:00
parent 3d939426b1
commit 715de6649b
9 changed files with 75 additions and 11 deletions
+3 -3
View File
@@ -8,12 +8,12 @@ RUN npm run build
FROM nginxinc/nginx-unprivileged:1.27-alpine
USER root
RUN apk add --no-cache jq
COPY --from=build /src/frontend/dist /usr/share/nginx/html
COPY docker/nginx.conf.template /etc/nginx/conf.d/default.conf
COPY docker/frontend-entrypoint.sh /usr/local/bin/frontend-entrypoint
RUN mv /usr/share/nginx/html/config.js /usr/share/nginx/html/config.template.js \
&& sed -i 's|{}|{ backendBaseUrl: "__BACKEND_BASE_URL__" }|' /usr/share/nginx/html/config.template.js \
&& chmod 0555 /usr/local/bin/frontend-entrypoint \
COPY docker/smoke/frontend-smoke.sh /usr/local/bin/frontend-config-smoke
RUN chmod 0555 /usr/local/bin/frontend-entrypoint /usr/local/bin/frontend-config-smoke \
&& chown -R 101:101 /usr/share/nginx/html
EXPOSE 8080