FROM zensical/zensical:latest AS builder
ENV PYTHONPATH=/docs
COPY . /docs
RUN zensical build --clean

FROM nginx:alpine AS iptv-docs

LABEL org.opencontainers.image.title="IPTV Checker"
LABEL org.opencontainers.image.description="Documentation for our services and products"
LABEL org.opencontainers.image.authors="Anthony Axenov <anthonyaxenov@gmail.com>"
LABEL org.opencontainers.image.url="https://m3u.su"
LABEL org.opencontainers.image.vendor="Anthony Axenov"
LABEL org.opencontainers.image.documentation="https://m3u.su/docs"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.source="https://git.axenov.dev/IPTV/docs"

COPY --from=builder /docs/site /usr/share/nginx/html
WORKDIR /usr/share/nginx/html
USER root
EXPOSE 80
CMD [ "nginx", "-g", "daemon off;" ]
