Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ RUN npm ci
COPY . .
RUN npm run build

FROM nginx:1.26.0-alpine3.19-slim
FROM nginxinc/nginx-unprivileged:stable-alpine
COPY /ci/nginx.conf /data/conf/nginx.conf
COPY --from=build /dist /usr/share/nginx/html

EXPOSE 80
EXPOSE 8080

WORKDIR /usr/share/nginx/html
COPY ./ci/env.sh .
COPY .env-vars .

USER root
RUN apk add --no-cache bash
RUN chmod +x /usr/share/nginx/html/env.sh
RUN chown -R nginx:nginx /usr/share/nginx/html
USER nginx

CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g 'daemon off;' -c /data/conf/nginx.conf"]
3 changes: 2 additions & 1 deletion ci/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pid /tmp/nginx.pid;
worker_processes auto;

events {
Expand All @@ -7,7 +8,7 @@ events {

http {
server {
listen 80;
listen 8080;
server_name localhost;

root /usr/share/nginx/html;
Expand Down
4 changes: 2 additions & 2 deletions ci/values-local-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
debug: true

containerPorts:
http: 80
http: 8080
https: ""

replicaCount: 1
Expand All @@ -33,7 +33,7 @@ readinessProbe:
service:
type: ClusterIP
ports:
http: 80
http: 8080
https: ""

ingress:
Expand Down
Loading