This commit is contained in:
2026-06-16 11:05:24 +05:00
parent fe3f683bfc
commit c487e3c583
10 changed files with 253 additions and 41 deletions
+40
View File
@@ -0,0 +1,40 @@
FROM alpine:3.20 AS builder
ENV PYTHONUNBUFFERED=1
RUN apk add --no-cache \
ca-certificates \
bash \
git \
openssh-client \
python3 \
python3-dev \
py3-pip \
build-base \
weasyprint
RUN python -m venv /src/env
ENV PATH="/src/env/bin:$PATH"
WORKDIR /src
COPY requirements.txt /src/
RUN pip install --upgrade pip && \
pip install -r /src/requirements.txt && \
rm -rf /tmp/* /var/cache/apk/*
FROM builder as makestatic
COPY docs /src/docs/
COPY zensical.toml /src/
RUN cp -r /src/mkdocs.yml /src/ 2>/dev/null || true
RUN cp -r /src/custom_theme /src/overrides 2>/dev/null || true
RUN cd /src && zensical build --config-file zensical.toml
FROM nginx:alpine
COPY docker/default.conf /etc/nginx/conf.d/default.conf
COPY --from=makestatic /src/site /sites/app.lexema.ru/docs
EXPOSE 80
+23
View File
@@ -0,0 +1,23 @@
server {
listen 80;
# location / {
root /sites/app.lexema.ru/docs;
# }
#expires $expires;
client_max_body_size 500M;
gzip on;
gzip_comp_level 4;
gzip_types text/html text/plain text/css application/javascript;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
}