Restore node:22-alpine frontend with vite preview (successful config)

This commit is contained in:
Agent Zero
2026-05-25 18:55:56 +00:00
parent 385861f486
commit 9fc4691c74
+5 -6
View File
@@ -51,7 +51,7 @@ services:
restart: unless-stopped
frontend:
image: nginx:alpine
image: node:22-alpine
working_dir: /app
expose:
- "80"
@@ -59,14 +59,13 @@ services:
- sh
- '-c'
- |
apk add --no-cache git nodejs npm curl
apk add --no-cache git curl
git clone --depth 1 https://forgejo.media-on.de/Leopoldadmin/web-cad.git /tmp/repo
cd /tmp/repo/frontend
cp -r /tmp/repo/frontend/* /app/
rm -rf /tmp/repo
npm ci
npx vite build --mode production
cp -r dist/* /usr/share/nginx/html/
cp nginx.conf /etc/nginx/conf.d/default.conf
nginx -g 'daemon off;'
npx vite preview --host 0.0.0.0 --port 80
depends_on:
- backend
healthcheck: