FROM ghcr.io/astral-sh/uv:debian AS builder # Install processing tools RUN apt-get update && apt-get install -y pngcrush imagemagick # Install Sass ENV SASS_VERSION=1.86.0 RUN mkdir -p /opt ADD "https://github.com/sass/dart-sass/releases/download/$SASS_VERSION/dart-sass-$SASS_VERSION-linux-x64.tar.gz" /opt/ RUN bash -c '(cd /opt && tar xzvf /opt/dart-sass-$SASS_VERSION-linux-x64.tar.gz)' ENV PATH=$PATH:/opt/dart-sass/ ## Let's build! :D WORKDIR /usr/src COPY .python-version uv.lock pyproject.toml ./ RUN uv sync COPY generator/ generator/ COPY site/ site/ COPY scripts/ scripts/ COPY .git/ .git/ RUN bash ./scripts/build-prod.sh # =================================================================== FROM caddy:2-alpine COPY --from=builder /usr/src/_dist /var/www WORKDIR /var/www EXPOSE 8080 CMD ["caddy", "run", "--config", "caddy_config.json"]