refactor(docker): move frontend build into multi-stage Docker build

- Remove frontend build steps from GitHub Actions workflow
- Add frontend-builder stage using oven/bun:1 in Dockerfile
- Build frontend inside Docker for better consistency and portability
- Copy built frontend from frontend-builder stage to runtime image
- Simplify CI/CD pipeline by consolidating build steps
This commit is contained in:
Ryan Walters
2025-11-02 22:56:07 -06:00
parent 52dee3eee4
commit ad6fd00197
2 changed files with 18 additions and 28 deletions

View File

@@ -81,31 +81,8 @@ jobs:
fi
done
# ========== Frontend Build ==========
- name: Install web dependencies
shell: bash
run: bun install
working-directory: web
- name: Build web frontend
shell: bash
run: bun run build
working-directory: web
env:
# API URL is relative (/api) since frontend and backend are on same domain
VITE_API_URL: /api
- name: Verify frontend build output
shell: bash
run: |
if [ ! -d "web/dist/client" ]; then
echo "::error::Frontend build output not found at web/dist/client"
exit 1
fi
echo "Frontend build successful, files ready for Docker image"
ls -la web/dist/client
# ========== Docker Build and Push ==========
# Note: Frontend is now built inside Docker using multi-stage build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3