25 lines
No EOL
632 B
Docker
25 lines
No EOL
632 B
Docker
FROM python:3 as builder
|
|
# Not using an Alpine build as we need Git to be installed
|
|
|
|
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
|
|
RUN pip install poetry
|
|
|
|
WORKDIR /usr/src
|
|
|
|
COPY poetry.lock pyproject.toml ./
|
|
COPY generator/ generator/
|
|
COPY site/ site/
|
|
COPY .git/ .git/
|
|
|
|
RUN poetry config virtualenvs.create false
|
|
RUN poetry install --no-interaction --no-root --without dev
|
|
RUN poetry run python3 generator/ generate site/
|
|
|
|
# ===================================================================
|
|
|
|
FROM caddy:2-alpine
|
|
|
|
COPY --from=builder /usr/src/_dist /var/www
|
|
WORKDIR /var/www
|
|
EXPOSE 8080
|
|
CMD ["caddy", "run", "--config", "caddy_config.json"] |