diff --git a/Dockerfile b/Dockerfile index 96a947cc..246afd9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,6 +38,9 @@ FROM nginx:alpine # Copy the static assets from the builder stage to the Nginx default static serve directory COPY --from=builder /app/dist/public /usr/share/nginx/html +# Copy the custom Nginx configuration file into the container +COPY default.conf /etc/nginx/conf.d/default.conf + # Expose the default Nginx port EXPOSE 80 diff --git a/default.conf b/default.conf new file mode 100644 index 00000000..2c8eb2c1 --- /dev/null +++ b/default.conf @@ -0,0 +1,9 @@ +server { + listen 80; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html; + } +}