Public Access
feat(docker): fail at start when AUTH_HOST or API_HOST is unset
An empty host gives a CSP connect-src that blocks every API call. The new entrypoint check stops the container early with a clear error.
This commit is contained in:
1 parent
25ade98989
commit
720764bf68
3 files changed
+7
-3
No files matched your search
+1
-2
@@ -12,8 +12,7 @@ RUN npm run build
|
||||
# Serve the static files using a lightweight web server
|
||||
FROM nginx:alpine
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
# nginx.conf is a template. An env var that is not set stays in it as ${...}, and nginx then fails to start.
|
||||
ENV AUTH_HOST="" API_HOST=""
|
||||
COPY --chmod=0755 docker-entrypoint.d/10-require-hosts.sh /docker-entrypoint.d/
|
||||
COPY nginx.conf /etc/nginx/templates/default.conf.template
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in new issue
Block a user