Files

40 lines
832 B
Docker
Raw Permalink Normal View History

2026-06-05 11:37:27 +05:00
FROM alpine:3.20 AS builder
ENV PYTHONUNBUFFERED=1
RUN apk add --no-cache \
2026-05-20 15:19:49 +05:00
ca-certificates \
bash \
git \
2026-06-05 11:46:52 +05:00
openssh-client \
2026-05-20 15:19:49 +05:00
python3 \
python3-dev \
2026-06-05 11:37:27 +05:00
py3-pip \
build-base \
weasyprint
2026-05-20 15:19:49 +05:00
RUN python -m venv /src/env
ENV PATH="/src/env/bin:$PATH"
2026-06-05 11:37:27 +05:00
WORKDIR /src
2026-05-20 15:19:49 +05:00
2026-06-05 11:37:27 +05:00
COPY requirements.txt /src/
RUN pip install --upgrade pip && \
pip install -r /src/requirements.txt && \
rm -rf /tmp/* /var/cache/apk/*
2026-05-20 15:19:49 +05:00
FROM builder as makestatic
2026-06-05 11:37:27 +05:00
COPY docs /src/docs/
2026-06-05 11:46:52 +05:00
COPY zensical.toml /src/
2026-06-05 11:37:27 +05:00
2026-06-05 11:53:48 +05:00
RUN cp -r /src/mkdocs.yml /src/ 2>/dev/null || true
RUN cp -r /src/custom_theme /src/overrides 2>/dev/null || true
2026-06-05 11:37:27 +05:00
RUN cd /src && zensical build --config-file zensical.toml
2026-06-05 11:53:48 +05:00
2026-06-05 11:37:27 +05:00
FROM nginx:alpine
2026-05-20 15:19:49 +05:00
COPY docker/default.conf /etc/nginx/conf.d/default.conf
2026-06-05 11:37:27 +05:00
COPY --from=makestatic /src/site /sites/app.lexema.ru/docs
EXPOSE 80