summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile8
-rwxr-xr-xwatch.sh7
2 files changed, 13 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 9cc1f4a..0000c90 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,8 +2,12 @@ FROM alpine:latest
RUN apk add --no-cache hugo git
+COPY . /app
+
WORKDIR /app
-EXPOSE 1313/tcp
+RUN ./watch.sh &
+
+EXPOSE 443/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
+ENTRYPOINT hugo serve --baseURL "$BASE_URL" -p "$PORT" --bind '0.0.0.0' -e "$HUGO_ENV" --disableFastRender --disableLiveReload
diff --git a/watch.sh b/watch.sh
new file mode 100755
index 0000000..ddf88f9
--- /dev/null
+++ b/watch.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+while true; do
+ git fetch && git reset --hard origin
+ sleep 60
+done
+