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:
Viktor Barzin 2026-02-23 22:27:52 +00:00
parent ed3bf57566
commit 9f86aaf540
No known key found for this signature in database
GPG key ID: 0EB088298288D958
2 changed files with 80 additions and 2 deletions

View file

@ -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