pipeline anpassungen
Build, Push and Deploy Florale Emotion Website / feature-branch (push) Has been skipped Details
Build, Push and Deploy Florale Emotion Website / production-branch (push) Failing after 2m11s Details

This commit is contained in:
Julian Vollmer 2026-01-26 14:26:17 +01:00
parent 12bfab933f
commit f780682b56
11 changed files with 36 additions and 37 deletions

View File

@ -40,9 +40,14 @@ Die Pipeline wird durch `.gitea/workflows/deploy.yml` definiert und umfasst:
### Docker Images ### Docker Images
Alle Images werden in der Harbor Registry gespeichert: Alle Images werden in der Harbor Registry gespeichert:
- `registry.julianvollmer.de/florale-emotion/florale-emotion-frontend` - `registry.julianvollmer.de/florale-emotion/florale-emotion-frontend` (Node.js 20 + Angular 17)
- `registry.julianvollmer.de/florale-emotion/florale-emotion-backend` - `registry.julianvollmer.de/florale-emotion/florale-emotion-backend` (Node.js 20 + Express)
- `registry.julianvollmer.de/florale-emotion/florale-emotion-bot` - `registry.julianvollmer.de/florale-emotion/florale-emotion-bot` (Node.js 20 + Cron Jobs)
### Technische Anforderungen
- **Node.js Version:** 20+ (erforderlich für AWS SDK)
- **Angular CLI:** Wird als devDependency installiert
- **Build-Prozess:** Multi-stage Docker Build für optimale Image-Größe
## Kubernetes-Manifeste ## Kubernetes-Manifeste
@ -63,12 +68,21 @@ Alle Images werden in der Harbor Registry gespeichert:
- Scheduled/Cron-basierte Ausführung - Scheduled/Cron-basierte Ausführung
- Resource Limits: 256Mi RAM, 100m CPU - Resource Limits: 256Mi RAM, 100m CPU
### Ingress Konfiguration ### Ingress Konfiguration (Traefik)
- **Production** (`ingress.yaml`): florale-emotion.de, www.florale-emotion.de, api.florale-emotion.de - **Production** (`ingress.yaml`): florale-emotion.de, www.florale-emotion.de, api.florale-emotion.de
- **Development** (`ingress-dev.yaml`): dev.florale-emotion.de, api-dev.florale-emotion.de - **Development** (`ingress-dev.yaml`): dev.florale-emotion.de, api-dev.florale-emotion.de
- Traefik als Kubernetes Ingress Controller
- Automatische SSL-Zertifikate via Let's Encrypt - Automatische SSL-Zertifikate via Let's Encrypt
- HTTPS-Weiterleitung aktiviert - HTTPS-Weiterleitung aktiviert
### DNS-Konfiguration
Folgende DNS-Einträge sind erforderlich:
```
dev.florale-emotion.de CNAME traefik.julianvollmer.de
api-dev.florale-emotion.de CNAME traefik.julianvollmer.de
api.florale-emotion.de CNAME traefik.julianvollmer.de
```
## Deployment-Prozess ## Deployment-Prozess
### Automatisches Deployment ### Automatisches Deployment

View File

@ -1,5 +1,5 @@
# Multi-stage build for Angular Frontend # Multi-stage build for Angular Frontend
FROM node:18-alpine AS builder FROM node:20-alpine AS builder
# Set working directory # Set working directory
WORKDIR /app WORKDIR /app
@ -7,14 +7,14 @@ WORKDIR /app
# Copy package files # Copy package files
COPY package*.json ./ COPY package*.json ./
# Install dependencies # Install ALL dependencies (including devDependencies for Angular CLI)
RUN npm ci --only=production RUN npm ci
# Copy source code # Copy source code
COPY . . COPY . .
# Build the Angular application # Build the Angular application for production
RUN npm run build --prod RUN npm run build:prod
# Production stage # Production stage
FROM nginx:alpine FROM nginx:alpine

View File

@ -1,4 +1,4 @@
FROM node:18-alpine FROM node:20-alpine
# Set working directory # Set working directory
WORKDIR /app WORKDIR /app

View File

@ -3,7 +3,7 @@ const http = require('http');
const options = { const options = {
hostname: 'localhost', hostname: 'localhost',
port: process.env.PORT || 3000, port: process.env.PORT || 3000,
path: '/health', path: '/api/health',
method: 'GET', method: 'GET',
timeout: 2000 timeout: 2000
}; };

View File

@ -19,6 +19,6 @@
"nodemon": "^3.0.1" "nodemon": "^3.0.1"
}, },
"engines": { "engines": {
"node": ">=16.0.0" "node": ">=20.0.0"
} }
} }

View File

@ -35,13 +35,13 @@ spec:
cpu: "300m" cpu: "300m"
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /health path: /api/health
port: 3000 port: 3000
initialDelaySeconds: 30 initialDelaySeconds: 30
periodSeconds: 10 periodSeconds: 10
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /health path: /api/health
port: 3000 port: 3000
initialDelaySeconds: 10 initialDelaySeconds: 10
periodSeconds: 5 periodSeconds: 5

View File

@ -31,16 +31,5 @@ spec:
cpu: "100m" cpu: "100m"
# Social Media Bot läuft als Cronjob/Scheduled Task # Social Media Bot läuft als Cronjob/Scheduled Task
# Keine Health Checks nötig da es kein HTTP Service ist # Keine Health Checks nötig da es kein HTTP Service ist
--- # Bot läuft als interner Service ohne öffentliche Exposition
apiVersion: v1 # Kein Service nötig, da keine HTTP-Requests von außen
kind: Service
metadata:
name: florale-emotion-bot-service
spec:
selector:
app: florale-emotion-bot
ports:
- protocol: TCP
port: 8080
targetPort: 8080
type: ClusterIP

View File

@ -3,11 +3,9 @@ kind: Ingress
metadata: metadata:
name: florale-emotion-dev-ingress name: florale-emotion-dev-ingress
annotations: annotations:
kubernetes.io/ingress.class: "nginx" kubernetes.io/ingress.class: "traefik"
cert-manager.io/cluster-issuer: "letsencrypt-prod" cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/ssl-redirect: "true" traefik.ingress.kubernetes.io/redirect-to-https: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/redirect-to-https: "true"
spec: spec:
tls: tls:
- hosts: - hosts:

View File

@ -3,11 +3,9 @@ kind: Ingress
metadata: metadata:
name: florale-emotion-ingress name: florale-emotion-ingress
annotations: annotations:
kubernetes.io/ingress.class: "nginx" kubernetes.io/ingress.class: "traefik"
cert-manager.io/cluster-issuer: "letsencrypt-prod" cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/ssl-redirect: "true" traefik.ingress.kubernetes.io/redirect-to-https: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/redirect-to-https: "true"
spec: spec:
tls: tls:
- hosts: - hosts:

View File

@ -1,4 +1,4 @@
FROM node:18-alpine FROM node:20-alpine
# Set working directory # Set working directory
WORKDIR /app WORKDIR /app

View File

@ -17,6 +17,6 @@
"nodemon": "^3.0.1" "nodemon": "^3.0.1"
}, },
"engines": { "engines": {
"node": ">=16.0.0" "node": ">=20.0.0"
} }
} }