Files
bolt-diy/.github/workflows/ci.yaml
Stijnus 49850d9253 fix: resolve critical Docker configuration issues (#2020)
* fix: update Docker workflow to use correct target stage name

- Change target from bolt-ai-production to runtime
- Matches the actual stage name in the new Dockerfile structure
- Fixes CI failure: target stage 'bolt-ai-production' could not be found

* fix: resolve critical Docker configuration issues

This commit fixes multiple critical Docker configuration issues that prevented successful builds:

**Dockerfile Issues Fixed:**
- Replace incomplete runtime stage with proper production stage using Wrangler
- Add missing environment variables for all API providers (DeepSeek, LMStudio, Mistral, Perplexity, OpenAI-like)
- Use correct port (5173) instead of 3000 to match Wrangler configuration
- Add proper bindings.sh script copying and execution permissions
- Configure Wrangler metrics and proper startup command

**Docker Compose Issues Fixed:**
- Add missing `context` and `dockerfile` fields to app-dev service
- Fix target name from `bolt-ai-development` to `development`

**Package.json Issues Fixed:**
- Update dockerbuild script to use correct target name `development`

**Testing:**
-  Both `pnpm run dockerbuild` and `pnpm run dockerbuild:prod` now work
-  All environment variables properly configured
-  Docker images build successfully with proper Wrangler integration

Resolves Docker build failures and enables proper containerized deployment.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update Dockerfile

* fix: update GitHub workflow Docker targets to match Dockerfile stage names

Update ci.yaml and docker.yaml workflows to use correct Docker target stage name 'bolt-ai-production' instead of 'runtime'.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Refactor Dockerfile for optimized production build

Adds git installation for build/runtime scripts and introduces a separate prod-deps stage to prune dependencies before final production image. Updates file copy sources to use prod-deps stage, improving build efficiency and image size.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-23 14:50:43 +02:00

91 lines
2.4 KiB
YAML

name: CI/CD
on:
push:
branches:
- main
pull_request:
# Cancel in-progress runs on the same branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup and Build
uses: ./.github/actions/setup-and-build
- name: Cache TypeScript compilation
uses: actions/cache@v4
with:
path: |
.tsbuildinfo
node_modules/.cache
key: ${{ runner.os }}-typescript-${{ hashFiles('**/tsconfig.json', 'app/**/*.ts', 'app/**/*.tsx') }}
restore-keys: |
${{ runner.os }}-typescript-
- name: Run type check
run: pnpm run typecheck
- name: Cache ESLint
uses: actions/cache@v4
with:
path: node_modules/.cache/eslint
key: ${{ runner.os }}-eslint-${{ hashFiles('.eslintrc*', 'app/**/*.ts', 'app/**/*.tsx') }}
restore-keys: |
${{ runner.os }}-eslint-
- name: Run ESLint
run: pnpm run lint
- name: Run tests
run: pnpm run test
- name: Upload test coverage
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: coverage/
retention-days: 7
docker-validation:
name: Docker Build Validation
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Validate Docker production build
run: |
echo "🐳 Testing Docker production target..."
docker build --target bolt-ai-production . --no-cache --progress=plain
echo "✅ Production target builds successfully"
- name: Validate Docker development build
run: |
echo "🐳 Testing Docker development target..."
docker build --target development . --no-cache --progress=plain
echo "✅ Development target builds successfully"
- name: Validate docker-compose configuration
run: |
echo "🐳 Validating docker-compose configuration..."
docker compose config --quiet
echo "✅ docker-compose configuration is valid"