feat: embed frontend into backend server with full-stack build pipeline (RCA-20)
The backend now serves the Vue admin UI as static files with SPA fallback, eliminating the need for a separate web server. Dockerfile builds both frontend and backend in a multi-stage pipeline. Added build:web and build:all scripts, updated CI to verify frontend builds, and fixed vitest config to exclude Playwright tests. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@@ -24,9 +24,26 @@ jobs:
|
||||
- run: npm run typecheck
|
||||
- run: npm test
|
||||
|
||||
web:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
|
||||
- name: Install and build frontend
|
||||
working-directory: web
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
needs: [test, web]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -38,6 +55,7 @@ jobs:
|
||||
docker run -d --name cb-test -p 8080:8080 cookiebridge:ci
|
||||
sleep 3
|
||||
curl -sf http://localhost:8080/health
|
||||
curl -sf http://localhost:8080/ | grep -q '<div id="app">'
|
||||
docker stop cb-test
|
||||
|
||||
extension:
|
||||
|
||||
Reference in New Issue
Block a user