-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-deploy.mdc
More file actions
37 lines (32 loc) · 1.02 KB
/
docker-deploy.mdc
File metadata and controls
37 lines (32 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
description: Docker und Deployment-Regeln
globs: Dockerfile,dockerfiles/**,*.yml,.github/**/*.yml
---
# Docker & Deployment
## Docker Build
- Multi-Stage Build: `builder` (kompiliert) → `runtime` (nur Node.js + dist)
- Base Image: `node:22.20.0-alpine`
- Shared-Paket wird nach `backend/dist/node_modules/@webmud3/shared` kopiert (kein npm Registry)
- Prod-Dependencies werden separat in `backend/dist/` installiert (`npm install --omit=dev`)
## Wichtige Docker-Umgebungsvariablen
```env
HOST=0.0.0.0
PORT=5000
TELNET_HOST=127.0.0.1
TELNET_PORT=23
TELNET_TLS=false
SOCKET_ROOT=/socket.io
SOCKET_TIMEOUT=900000
```
## CI/CD
- **Build & Test**: GitHub Action auf PRs gegen `develop`
- **Deploy to Azure**: GitHub Action auf Push zu `master`
- Azure Deployment kopiert `shared/dist` manuell nach `backend/dist/node_modules/@webmud3`
## Build-Reihenfolge
```
npm ci → npm run build:prod
1. shared: tsc
2. frontend: ng build --configuration=production
3. backend: tsc
4. postbuild: cpy frontend/dist → backend/dist/wwwroot/
```