2022-02-08 21:52:45 +01:00
|
|
|
FROM python:3.8-alpine3.13 as borgmatic
|
2019-05-20 20:41:39 +02:00
|
|
|
|
|
|
|
COPY . /app
|
2022-02-08 22:21:11 +01:00
|
|
|
RUN apk add --no-cache py3-ruamel.yaml py3-ruamel.yaml.clib
|
2022-02-08 21:52:45 +01:00
|
|
|
RUN pip install --no-cache /app && generate-borgmatic-config && chmod +r /etc/borgmatic/config.yaml
|
2019-06-23 07:04:56 +02:00
|
|
|
RUN borgmatic --help > /command-line.txt \
|
2021-06-18 05:41:44 +02:00
|
|
|
&& for action in init prune create check extract export-tar mount umount restore list info borg; do \
|
2019-06-23 07:04:56 +02:00
|
|
|
echo -e "\n--------------------------------------------------------------------------------\n" >> /command-line.txt \
|
|
|
|
&& borgmatic "$action" --help >> /command-line.txt; done
|
2019-05-20 20:41:39 +02:00
|
|
|
|
2020-11-22 23:48:07 +01:00
|
|
|
FROM node:15.2.1-alpine as html
|
2019-05-20 20:41:39 +02:00
|
|
|
|
2019-10-14 22:13:41 +02:00
|
|
|
ARG ENVIRONMENT=production
|
|
|
|
|
2019-05-20 20:41:39 +02:00
|
|
|
WORKDIR /source
|
|
|
|
|
|
|
|
RUN npm install @11ty/eleventy \
|
|
|
|
@11ty/eleventy-plugin-syntaxhighlight \
|
|
|
|
@11ty/eleventy-plugin-inclusive-language \
|
2020-08-21 23:27:47 +02:00
|
|
|
@11ty/eleventy-navigation \
|
2019-05-20 20:41:39 +02:00
|
|
|
markdown-it \
|
|
|
|
markdown-it-anchor \
|
|
|
|
markdown-it-replace-link
|
|
|
|
COPY --from=borgmatic /etc/borgmatic/config.yaml /source/docs/_includes/borgmatic/config.yaml
|
|
|
|
COPY --from=borgmatic /command-line.txt /source/docs/_includes/borgmatic/command-line.txt
|
|
|
|
COPY . /source
|
2019-10-14 22:13:41 +02:00
|
|
|
RUN NODE_ENV=${ENVIRONMENT} npx eleventy --input=/source/docs --output=/output/docs \
|
2019-05-20 20:41:39 +02:00
|
|
|
&& mv /output/docs/index.html /output/index.html
|
|
|
|
|
2020-11-22 23:48:07 +01:00
|
|
|
FROM nginx:1.19.4-alpine
|
2019-05-20 20:41:39 +02:00
|
|
|
|
|
|
|
COPY --from=html /output /usr/share/nginx/html
|
|
|
|
COPY --from=borgmatic /etc/borgmatic/config.yaml /usr/share/nginx/html/docs/reference/config.yaml
|