fix(auth): serve unified frontend from nginx
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app/frontend
|
||||
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm ci --no-audit --no-fund
|
||||
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.29-alpine
|
||||
|
||||
COPY --from=builder /app/frontend/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
@@ -10,6 +10,8 @@ data:
|
||||
server_name _;
|
||||
|
||||
client_max_body_size 10m;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location = /healthz {
|
||||
proxy_pass ${AUTHSERVER_BACKEND_UPSTREAM};
|
||||
@@ -79,7 +81,7 @@ data:
|
||||
}
|
||||
|
||||
location / {
|
||||
return 404;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
---
|
||||
@@ -100,7 +102,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.29-alpine
|
||||
image: docker.io/library/authserver-nginx:1.2.3
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
|
||||
Reference in New Issue
Block a user