- Galerie laedt Bilder dynamisch per JavaScript statt Jekyll-Loop - nginx autoindex liefert JSON-Bilderliste - Nextcloud-Ordner (Websitebilder) wird als Volume gemountet - ImageMagick generiert automatisch 512px Thumbnails - Hintergrund-Check alle 60s fuer neue Bilder - Neuer entrypoint.sh fuer Thumbnail-Generierung + nginx Start Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
713 B
Docker
32 lines
713 B
Docker
# === Build-Phase: Jekyll kompiliert die statische Website ===
|
|
FROM ruby:3.2-alpine AS builder
|
|
|
|
RUN apk add --no-cache build-base
|
|
|
|
WORKDIR /site
|
|
|
|
COPY Gemfile ./
|
|
RUN bundle install
|
|
|
|
COPY . .
|
|
|
|
RUN bundle exec jekyll build
|
|
|
|
# === Serve-Phase: nginx + ImageMagick fuer Thumbnails ===
|
|
FROM nginx:alpine
|
|
|
|
RUN apk add --no-cache imagemagick
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=builder /site/_site /usr/share/nginx/html
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
# Leere Bildverzeichnisse anlegen (werden durch Volumes ueberschrieben)
|
|
RUN mkdir -p /usr/share/nginx/html/images/fulls \
|
|
/usr/share/nginx/html/images/thumbs
|
|
|
|
EXPOSE 80
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|