1
0
Fork 0

Initial commit

This commit is contained in:
Jonas Tobias Hopusch 2021-12-05 16:45:50 +01:00
commit 426d7ada07
Failed to generate hash of commit
4 changed files with 30 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
archive-token.txt

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM caddy:2
ARG WEBSITE_ARCHIVE_URL
ARG WEBSITE_ARCHIVE_FOLDER
RUN apk update && apk upgrade && set -eu
RUN apk add zola --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ && apk add tar gzip curl
COPY archive-token.txt /archive-token.txt
RUN curl -X "GET" -H "Authorization: token $(cat /archive-token.txt)" "$WEBSITE_ARCHIVE_URL" 2>/dev/null | gzip --decompress --stdout - | tar xf - ; rm /archive-token.txt
WORKDIR /srv/$WEBSITE_ARCHIVE_FOLDER
RUN zola build
EXPOSE 80/tcp
CMD ["caddy", "file-server", "--root", "public"]

6
build-kanzleiseite.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
docker build --no-cache --pull -t jotoho/www.hopusch.de:latest \
--build-arg WEBSITE_ARCHIVE_URL="https://gitea.jotoho.de/api/v1/repos/jotoho/kanzleiseite/archive/master.tar.gz" \
--build-arg WEBSITE_ARCHIVE_FOLDER="kanzleiseite" \
.

6
build-personalsite.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
docker build --no-cache --pull -t jotoho/www.jotoho.de:latest \
--build-arg WEBSITE_ARCHIVE_URL="https://gitea.jotoho.de/api/v1/repos/jotoho/my-website/archive/master.tar.gz" \
--build-arg WEBSITE_ARCHIVE_FOLDER="my-website" \
.