mirror of
https://codeberg.org/angestoepselt/homepage.git
synced 2026-03-21 22:32:17 +00:00
These are a few major updates with breaking changes and / or
deprecations. In particular:
- 11ty v3 [1]
- The configuration file has been ESM-ified
- A few things used by the RSS templates had been deprecated. Those
have been corrected.
- Sass
- `transparentize()` -> `color.scale()`
- Mixed declaration syntax changes [2]
[1]: https://github.com/11ty/eleventy/releases/tag/v3.0.0
[2]: https://sass-lang.com/documentation/breaking-changes/mixed-decls/
58 lines
1.6 KiB
Docker
58 lines
1.6 KiB
Docker
#
|
|
# Static site build phase
|
|
#
|
|
FROM docker.io/node:22 as build
|
|
ARG SITE
|
|
|
|
WORKDIR /build
|
|
|
|
COPY package.json package-lock.json .
|
|
RUN --mount=type=cache,target=/root/.npm \
|
|
npm clean-install --omit=dev
|
|
|
|
COPY styles/ styles/
|
|
RUN npm run build:styles
|
|
|
|
COPY eleventy.config.mjs .
|
|
COPY assets assets/
|
|
COPY includes includes/
|
|
COPY sites/${SITE} sites/${SITE}/
|
|
# These are symlinked from other sites:
|
|
COPY sites/angestoepselt/_images/home-banner.jpg /build/sites/angestoepselt/_images/
|
|
RUN SITE=${SITE} npm run build:site
|
|
|
|
|
|
#
|
|
# Actual server container
|
|
#
|
|
FROM docker.io/python:3.13-alpine
|
|
ARG SITE
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
apk add --no-cache lighttpd && \
|
|
python -m pip install legacy-cgi itsdangerous requests
|
|
|
|
COPY --from=build /build/dist /www/
|
|
COPY cgi-bin /cgi-bin/
|
|
COPY sites/${SITE}/httpd.conf /httpd.conf
|
|
COPY sites/${SITE}/_data/config.json /config.json
|
|
|
|
RUN sed -i \
|
|
-e "s,@python@,/usr/local/bin/python,g" \
|
|
-e "s,@site@,/www,g" \
|
|
-e "s,@cgibin@,/cgi-bin,g" \
|
|
/httpd.conf
|
|
|
|
EXPOSE 80/tcp
|
|
# Note: these are just those environment variables that have a default variable
|
|
# and are optional, the non optional ones *will* need to be set by the user.
|
|
ENV ZAMMAD_URL=https://ticket.z31.it
|
|
ENV ZAMMAD_GROUP=""
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1/ || exit 1
|
|
|
|
# Reroute stdout to a new file descriptor so that Lighttpd can use it as the
|
|
# access log. See http.conf and here:
|
|
# https://redmine.lighttpd.net/boards/2/topics/8382
|
|
ENTRYPOINT exec 3>&1 && /usr/sbin/lighttpd -Df /httpd.conf
|