Skip to content
Discussion options

You must be logged in to vote

I could fix it at the end.
I was running my Angular app within a container based on the image -> node:16.15.1-alpine

I changed the config of the nginx-server.

  1. I added following line to my nginx.conf:
    location / {
    root /usr/share/nginx/html;
    index index.html index.htm;
    try_files $uri /index.html;
    }

  2. I overwrote the default-config with my new config within my Dockerfile:

FROM node:16.15.1-alpine as node
WORKDIR /app
COPY . .
RUN npm ci
RUN npm run build:cypress

FROM nginx:alpine
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=node /app/dist/. /usr/share/nginx/html

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 2bit-waterkamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant