diff --git a/Dockerfile b/Dockerfile index 266dae2..9c23348 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ FROM ghcr.io/getzola/zola:v0.18.0 as zola ARG BASE_URL="https://www.christianfosli.com" +ARG DRAFTS="0" COPY . /project COPY --from=busybox:1-uclibc /bin/sh /bin/ WORKDIR /project -RUN zola build --base-url $BASE_URL +RUN zola build --base-url $BASE_URL $([ "$DRAFTS" = 1 ] && echo "--drafts" || echo "") FROM ghcr.io/static-web-server/static-web-server:2 WORKDIR / diff --git a/docker-compose.yaml b/docker-compose.yaml index 9fc1bda..567caa0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,5 +4,10 @@ services: context: . args: BASE_URL: "http://localhost:8000" + DRAFTS: "1" + develop: + watch: + - path: . + action: rebuild ports: - "8000:80"