Docker
This commit is contained in:
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
# ---- Build Stage ----
|
||||
FROM node:18 AS builder
|
||||
|
||||
# Arbeitsverzeichnis im Container
|
||||
WORKDIR /app
|
||||
|
||||
# Package-Dateien kopieren und installieren
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm install
|
||||
|
||||
# Quellcode kopieren
|
||||
COPY . .
|
||||
|
||||
# Angular Build (Produktionsmodus)
|
||||
RUN npm run build -- --configuration production
|
||||
|
||||
# ---- Run Stage ----
|
||||
FROM nginx:stable-alpine
|
||||
|
||||
# Angular-Output in Nginx kopieren
|
||||
COPY --from=builder /app/dist/stellar-lines/browser /usr/share/nginx/html
|
||||
|
||||
# Optionale eigene Nginx-Konfiguration (wenn gewünscht)
|
||||
# COPY nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Exponiere Port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Start-Befehl (wird automatisch vom Nginx-Image gesetzt)
|
||||
Reference in New Issue
Block a user