35 lines
675 B
Docker
35 lines
675 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
|
|
|
|
RUN apk add --no-cache imagemagick docker-cli
|
|
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm install --omit=dev
|
|
|
|
COPY backend ./backend
|
|
COPY --from=builder /site/_site ./public
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
# Verzeichnisse anlegen
|
|
RUN mkdir -p /app/public/images/fulls /app/public/images/thumbs /app/data
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|