Restructered repository and added dockerfiles.

This commit is contained in:
Luc Bijl 2023-09-30 17:21:33 +02:00
parent 6f626ea686
commit 25dde6a119
8 changed files with 86 additions and 22 deletions

View file

@ -0,0 +1,15 @@
FROM python:3-alpine
ARG USER=1001
RUN adduser -h /usr/src/mkdocs -D -u $USER mkdocs
USER mkdocs
RUN mkdir -p /usr/src/mkdocs/build
WORKDIR /usr/src/mkdocs/build
RUN pip install --upgrade pip
RUN pip install pymdown-extensions \
&& pip install mkdocs \
&& pip install mkdocs-material

View file

@ -0,0 +1,24 @@
FROM nginx:alpine
RUN apk add git \
&& apk add python3 py3-pip
ENV GIT_REPO_URL='' \
GIT_REPO_NAME=''
RUN mkdir /mkdocs
WORKDIR /mkdocs
RUN pip install --upgrade pip
RUN pip install pymdown-extensions \
&& pip install mkdocs \
&& pip install mkdocs-material
COPY root /etc/crontabs/root
COPY git-mkdocs /bin/git-mkdocs
RUN chmod 744 /bin/git-mkdocs
RUN touch /docker-entrypoint.d/cron.sh \
&& echo "exec crond" > /docker-entrypoint.d/cron.sh \
&& chmod 776 /docker-entrypoint.d/cron.sh

View file

@ -0,0 +1,5 @@
#!/bin/sh
git clone $GIT_REPO_URL
cd /mkdocs/$GIT_REPO_NAME
git pull
mkdocs build -f /mkdocs/$GIT_REPO_NAME/mkdocs.yml -d /usr/share/nginx/html

View file

@ -0,0 +1,3 @@
# do daily/weekly/monthly maintanance
# min hour day month weekday command
* * * * * git-mkdocs