diff --git a/Dockerfile b/Dockerfile index 730871c..13835ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ RUN hugo FROM nginx:alpine +COPY nginx.conf /etc/nginx/nginx.conf COPY --from=build /src/public /usr/share/nginx/html EXPOSE 80 diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..e6034d6 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,14 @@ +events{} + +http { + include /etc/nginx/mime.types; + server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + location / { + try_files $uri $uri/ /index.html; + } + } +}