diff --git a/Dockerfile b/Dockerfile index ef27eb9..92847ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,6 @@ RUN npm run build # Runtime Stage FROM nginx:alpine COPY --from=builder /app/dist/*/browser /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file +CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..79fd959 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,11 @@ +server { + listen 80; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } +}