summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorhy <hyang@hyang.xyz>2023-09-09 19:21:28 -0700
committerhy <hyang@hyang.xyz>2023-09-09 19:21:59 -0700
commitecbe7fdcec4744c74ad5089a2764706c2af708af (patch)
treedf100c6195bb2b33d30985e14d53b970b3ee8598 /Dockerfile
parent8b74aa7acb104231bb627eaf59d81d60c683695b (diff)
Add dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index 67cc19f..9cc1f4a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,9 @@
-FROM klakegg/hugo
+FROM alpine:latest
-WORKDIR /src
+RUN apk add --no-cache hugo git
-COPY ./ /src
+WORKDIR /app
-ENTRYPOINT hugo serve
+EXPOSE 1313/tcp
+
+ENTRYPOINT (git clone "$REPO" . || git fetch && git reset --hard origin) && git submodule update --init --remote && hugo serve --baseURL "$BASE_URL" -p "$PORT" --bind '0.0.0.0' -e "$HUGO_ENV" --disableFastRender --disableLiveReload