2022-05-24 12:52:25 +00:00
|
|
|
FROM alpine:latest AS builder
|
|
|
|
|
|
|
|
ENV MKDOCS_VERSION=1.1.0 \
|
|
|
|
DOCS_DIRECTORY='/mkdocs' \
|
|
|
|
LIVE_RELOAD_SUPPORT='false' \
|
|
|
|
ADD_MODULES='false' \
|
|
|
|
FAST_MODE='false' \
|
|
|
|
PYTHONUNBUFFERED=1 \
|
|
|
|
GIT_REPO='false' \
|
|
|
|
GIT_BRANCH='master' \
|
|
|
|
AUTO_UPDATE='false' \
|
|
|
|
UPDATE_INTERVAL=15
|
|
|
|
|
|
|
|
ADD docker/container-files/ /
|
2022-10-25 08:13:59 +00:00
|
|
|
ADD mkdocs/requirements.txt /mkdocs/requirements.txt
|
2024-01-24 11:27:06 +00:00
|
|
|
RUN apk add --update \
|
|
|
|
ca-certificates \
|
|
|
|
bash \
|
|
|
|
git \
|
|
|
|
openssh \
|
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
py3-setuptools \
|
|
|
|
py-pip \
|
|
|
|
build-base \
|
|
|
|
libffi-dev cairo-dev cairo cairo-tools \
|
|
|
|
jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev
|
2024-01-24 11:30:40 +00:00
|
|
|
RUN pip install --upgrade pip \
|
|
|
|
&& pip install -r /mkdocs/requirements.txt \
|
2022-10-25 06:41:16 +00:00
|
|
|
# pip install mkdocs==${MKDOCS_VERSION} && \
|
2024-01-24 11:27:06 +00:00
|
|
|
# pip install mkdocs-material && \
|
|
|
|
# pip install mkdocs-img2fig-plugin && \
|
2024-01-24 11:30:40 +00:00
|
|
|
&& cd /bootstrap && pip install -e /bootstrap \
|
|
|
|
&& rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* \
|
|
|
|
&& chmod 600 /root/.ssh/config
|
2022-05-24 12:52:25 +00:00
|
|
|
|
|
|
|
CMD ["/usr/bin/bootstrap", "start"]
|
|
|
|
|
|
|
|
FROM builder as makestatic
|
|
|
|
ADD docs /src/docs/
|
2023-12-28 09:54:00 +00:00
|
|
|
ADD mkdocs.yml /src/
|
2023-12-28 09:36:55 +00:00
|
|
|
RUN cd /src && mkdocs build
|
2022-05-24 12:52:25 +00:00
|
|
|
|
|
|
|
FROM nginx
|
|
|
|
# RUN rm /etc/nginx/sites-enabled/default
|
|
|
|
COPY docker/default.conf /etc/nginx/conf.d/default.conf
|
|
|
|
COPY --from=makestatic /src/site /sites/app.lexema.ru/docs
|