add K8s nginx config and parameterize Dockerfile.dashboard
Create nginx-k8s.conf that proxies to localhost:8000 instead of api-gateway:8000 for K8s pods where both containers share a network namespace. Update Dockerfile.dashboard to accept a NGINX_CONF build arg (defaults to docker/nginx.conf for docker-compose compatibility).
This commit is contained in:
parent
ed3bf57566
commit
9f86aaf540
2 changed files with 80 additions and 2 deletions
|
|
@ -23,8 +23,9 @@ FROM nginx:alpine
|
|||
# Remove default nginx site
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy custom nginx config
|
||||
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
# Copy custom nginx config (override NGINX_CONF for K8s builds)
|
||||
ARG NGINX_CONF=docker/nginx.conf
|
||||
COPY ${NGINX_CONF} /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy built assets from the builder stage
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue