Dockerfile:
FROM node:18.20-alpine3.19 As build
WORKDIR /usr/local/app
COPY package*.json ./
RUN npm install
COPY ./ /usr/local/app/
ARG ENVIRONMENT=production
RUN npm run build -- --configuration=${ENVIRONMENT}
### STAGE 2: Run ###
FROM nginx:1.25.3-alpine
COPY --from=build /usr/local/app/dist/iris-lens-client /usr/share/nginx/html
COPY --from=build /usr/local/app/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/local/app/commit.txt /usr/share/nginx/html
EXPOSE 80
and nginx.conf:
server {
listen 80 default_server;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
}
Whenever I run the container and visit the host I get the page:
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.
Thank you for using nginx.
Can’t visit any other pages or anything like that. It didn’t have this issue previously when I was using Angular 16 (only difference being the node version really)
Angular 16 -> Angular 18 upgrade.