19 lines
491 B
Docker
19 lines
491 B
Docker
# Stage 1: Hugo bauen
|
|
FROM klakegg/hugo:alpine AS builder
|
|
# Kopiere das gesamte Verzeichnis
|
|
COPY . /src
|
|
# Bauen der Seite
|
|
RUN hugo
|
|
|
|
# Stage 2: Nginx ausliefern
|
|
FROM nginx:alpine
|
|
|
|
# 1. Nginx Konfigurationsdatei kopieren (wichtig für Reverse Proxy)
|
|
#COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY default.conf.template /etc/nginx/conf.d/default.conf.template
|
|
|
|
# 2. Kopieren der generierten Seite
|
|
COPY --from=builder /src/public /usr/share/nginx/html
|
|
|
|
# Nginx läuft auf Port 80
|
|
EXPOSE 80 |