Files
Photography/Dockerfile
Tom Misch 55f201da40
Some checks failed
Build & Push Docker Image / build-and-push (push) Failing after 14s
Add admin deployment sync
2026-05-11 10:39:02 +02:00

39 lines
941 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: node.js backend + ImageMagick ===
FROM node:20-alpine
# ImageMagick fuer Thumbnails, Docker CLI fuer Admin-Sync, Build-Tools fuer sqlite3 native bindings
RUN apk add --no-cache imagemagick docker-cli python3 make g++ build-base sqlite-dev
WORKDIR /app
COPY package*.json ./
RUN npm install --omit=dev
COPY backend ./backend
COPY --from=builder /site/_site ./public
COPY entrypoint.sh /entrypoint.sh
# Behebt Windows CRLF Zeilenumbrueche, ansonsten stuerzt Alpine mit "sh\r: not found" ab!
RUN sed -i 's/\r$//' /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Verzeichnisse anlegen
RUN mkdir -p /app/public/images/fulls /app/public/images/thumbs /app/data
EXPOSE 8090
ENTRYPOINT ["/entrypoint.sh"]