diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b13d066 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +public/ +resources/ +.hugo_build.lock +.idea/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9d78baa --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM hugomods/hugo:exts AS builder +WORKDIR /src +COPY . . +RUN git submodule update --init --recursive && \ + hugo --gc --minify + +FROM nginx:alpine +COPY --from=builder /src/public /usr/share/nginx/html +EXPOSE 80 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..40c13ea --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +services: + web: + build: . + ports: + - "8080:80" + restart: unless-stopped