diff --git a/Dockerfile b/Dockerfile index df2e5696..cd0dd282 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,5 +13,6 @@ RUN yarn build && sed -i 's/fonts.gstatic.com/fonts.kavin.rocks/g' dist/css/*.cs FROM nginx:alpine COPY --from=build /app/dist/ /usr/share/nginx/html/ +COPY docker/nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 diff --git a/docker/nginx.conf b/docker/nginx.conf new file mode 100644 index 00000000..59ee3c26 --- /dev/null +++ b/docker/nginx.conf @@ -0,0 +1,12 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + error_page 404 =200 /index.html; +}