Serve the frontend's config.js with the API password
The bundled frontend gets a token with API_PASSWORD from config.js. The server now generates config.js from its own config, so setting API_PASSWORD on the server container is enough.
This commit is contained in:
1 parent
6da96f79e7
commit
fc7d787014
3 files changed
+29
-2
No files matched your search
@@ -18,8 +18,6 @@ RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache
|
||||
|
||||
# Stage 2: Frontend static files (the same for every platform)
|
||||
FROM --platform=$BUILDPLATFORM ${FRONTEND_IMAGE} AS frontend
|
||||
# Empty API_HOSTNAME makes the frontend use relative paths
|
||||
RUN echo "window.__RUNTIME_CONFIG__ = { API_HOSTNAME: '' };" > /usr/share/nginx/html/config.js
|
||||
|
||||
# Stage 3: Final image. No RUN steps here, so no emulation is needed for other architectures.
|
||||
FROM alpine:3.22
|
||||
|
||||
Reference in new issue
Block a user