chore: upgrade to Debian 13 (Trixie), Node.js 22 LTS, PostgreSQL 17

- LXC templates: debian-13-standard (default)
- Docker images: node:22-alpine, postgres:17-alpine
- TypeScript target: ES2022
- Updated template references (Ubuntu 24.04, Alpine 3.20)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Mueller 2026-03-20 22:01:28 +01:00
parent c5808dbf55
commit acceefe99b
4 changed files with 14 additions and 14 deletions

View File

@ -10,14 +10,14 @@ Du bist ein Docker-Agent für React + Node.js Webprojekte.
### Backend (Node.js/Express) ### Backend (Node.js/Express)
```dockerfile ```dockerfile
FROM node:20-alpine AS builder FROM node:22-alpine AS builder
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm ci --only=production RUN npm ci --only=production
COPY . . COPY . .
RUN npm run build RUN npm run build
FROM node:20-alpine FROM node:22-alpine
WORKDIR /app WORKDIR /app
RUN addgroup -g 1001 appgroup && adduser -u 1001 -G appgroup -s /bin/sh -D appuser RUN addgroup -g 1001 appgroup && adduser -u 1001 -G appgroup -s /bin/sh -D appuser
COPY --from=builder /app/dist ./dist COPY --from=builder /app/dist ./dist
@ -31,7 +31,7 @@ CMD ["node", "dist/index.js"]
### Frontend (React) ### Frontend (React)
```dockerfile ```dockerfile
FROM node:20-alpine AS builder FROM node:22-alpine AS builder
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm ci RUN npm ci
@ -80,7 +80,7 @@ services:
retries: 3 retries: 3
db: db:
image: postgres:16-alpine image: postgres:17-alpine
volumes: volumes:
- pgdata:/var/lib/postgresql/data - pgdata:/var/lib/postgresql/data
environment: environment:

View File

@ -71,9 +71,9 @@ npx tsc --init
```json ```json
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2020", "target": "ES2022",
"module": "commonjs", "module": "commonjs",
"lib": ["ES2020"], "lib": ["ES2022"],
"outDir": "./dist", "outDir": "./dist",
"rootDir": "./src", "rootDir": "./src",
"strict": true, "strict": true,

View File

@ -15,7 +15,7 @@ PVE_TOKEN_ID=$PVE_TOKEN_ID # API Token ID
PVE_TOKEN_SECRET=$PVE_TOKEN_SECRET # API Token Secret PVE_TOKEN_SECRET=$PVE_TOKEN_SECRET # API Token Secret
PVE_NODE=$PVE_NODE # Node-Name (default: pve) PVE_NODE=$PVE_NODE # Node-Name (default: pve)
PVE_STORAGE=$PVE_STORAGE # Storage (default: local-lvm) PVE_STORAGE=$PVE_STORAGE # Storage (default: local-lvm)
LXC_TEMPLATE=$LXC_TEMPLATE # Template (default: debian-12-standard) LXC_TEMPLATE=$LXC_TEMPLATE # Template (default: debian-13-standard)
``` ```
## LXC-CONTAINER ERSTELLEN ## LXC-CONTAINER ERSTELLEN
@ -49,10 +49,10 @@ curl -sk -X POST "https://$PVE_HOST:$PVE_PORT/api2/json/nodes/$PVE_NODE/lxc" \
ssh root@$PVE_HOST << 'EOF' ssh root@$PVE_HOST << 'EOF'
# Template herunterladen falls nötig # Template herunterladen falls nötig
pveam update pveam update
pveam download local debian-12-standard_12.7-1_amd64.tar.zst pveam download local debian-13-standard_12.7-1_amd64.tar.zst
# Container erstellen # Container erstellen
pct create $VMID local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst \ pct create $VMID local:vztmpl/debian-13-standard_12.7-1_amd64.tar.zst \
--hostname app-staging \ --hostname app-staging \
--storage local-lvm \ --storage local-lvm \
--rootfs local-lvm:8 \ --rootfs local-lvm:8 \
@ -80,7 +80,7 @@ ssh root@$PVE_HOST "pct exec $VMID -- bash -c '
apt install -y curl git sudo wget gnupg2 ca-certificates apt install -y curl git sudo wget gnupg2 ca-certificates
# Node.js 20 LTS # Node.js 20 LTS
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs apt install -y nodejs
# Docker (in unprivileged LXC mit nesting) # Docker (in unprivileged LXC mit nesting)
@ -229,6 +229,6 @@ Nutze `/ssh-deploy` mit der LXC-IP als SSH_HOST.
## TEMPLATES (häufig genutzt) ## TEMPLATES (häufig genutzt)
| Template | Verwendung | | Template | Verwendung |
|----------|-----------| |----------|-----------|
| `debian-12-standard` | Standard für Webapps | | `debian-13-standard` | Standard für Webapps (Trixie) |
| `ubuntu-22.04-standard` | Alternative mit Ubuntu | | `ubuntu-24.04-standard` | Alternative mit Ubuntu |
| `alpine-3.19-default` | Minimal, für einfache Services | | `alpine-3.20-default` | Minimal, für einfache Services |

View File

@ -38,7 +38,7 @@ PVE_TOKEN_ID=
PVE_TOKEN_SECRET= PVE_TOKEN_SECRET=
PVE_NODE=pve PVE_NODE=pve
PVE_STORAGE=local-lvm PVE_STORAGE=local-lvm
LXC_TEMPLATE=debian-12-standard LXC_TEMPLATE=debian-13-standard
# Token erstellen: Datacenter > Permissions > API Tokens # Token erstellen: Datacenter > Permissions > API Tokens
# ------------------------------------------- # -------------------------------------------