diff --git a/Dockerfile b/Dockerfile index a86fb23..474dbc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,9 @@ FROM nginx:latest -COPY build /usr/share/nginx/html +# Copy the nginx configuration file +COPY nginx.conf /etc/nginx/nginx.conf + +COPY build /etc/nginx/html EXPOSE 80 diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..93bfc74 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,14 @@ +events {} + +http { + server { + listen 80; + location / { + + if (!-e $request_filename) { + rewrite ^(.*)$ /index.html break; + } + + } + } +} \ No newline at end of file