* 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>
67 lines
2.0 KiB
YAML
67 lines
2.0 KiB
YAML
name: Docker Publish
|
|
|
|
on:
|
|
push:
|
|
branches: [main, stable]
|
|
tags: ['v*', '*.*.*']
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
id-token: write
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
|
|
jobs:
|
|
docker-build-publish:
|
|
runs-on: ubuntu-latest
|
|
# timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set lowercase image name
|
|
id: image
|
|
run: echo "name=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract metadata for Docker image
|
|
id: meta
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ steps.image.outputs.name }}
|
|
tags: |
|
|
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
|
|
type=raw,value=stable,enable=${{ github.ref == 'refs/heads/stable' }}
|
|
type=ref,event=tag
|
|
type=sha,format=short
|
|
type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/stable' }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
target: bolt-ai-production
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
|
|
- name: Check manifest
|
|
run: docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ steps.image.outputs.name }}:${{ steps.meta.outputs.version }} |