Skip to content

Commit

Permalink
chore: Show drafts when running locally, support docker compose watch
Browse files Browse the repository at this point in the history
* Show drafts when running locally

* Support using `docker compose watch` to automatically rebuild when content changes
  • Loading branch information
christianfosli committed Mar 31, 2024
1 parent a101d83 commit 99c692e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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 /
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@ services:
context: .
args:
BASE_URL: "http://localhost:8000"
DRAFTS: "1"
develop:
watch:
- path: .
action: rebuild
ports:
- "8000:80"

0 comments on commit 99c692e

Please sign in to comment.