diff --git a/Dockerfile b/Dockerfile index c564feff5..2a51e32a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,5 +5,6 @@ RUN yarn install --network-timeout 1000000 COPY . . RUN yarn build -FROM nginx +FROM nginx:mainline-alpine +COPY docker/nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/build /usr/share/nginx/html \ No newline at end of file diff --git a/docker/nginx.conf b/docker/nginx.conf new file mode 100644 index 000000000..77fe1d78d --- /dev/null +++ b/docker/nginx.conf @@ -0,0 +1,10 @@ +server { + listen 80 default_server; + server_name _; + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html =404; + } +} \ No newline at end of file