Skip to content

Conversation

Stijnus
Copy link
Collaborator

@Stijnus Stijnus commented Sep 30, 2025

Summary

Fixes #2014

This PR resolves critical Docker configuration issues that prevented users from building the application using Docker.

Problem

Users were encountering the following error when running npm run dockerbuild:

Error: "bolt-ai-development" is no longer defined

The root cause was mismatched stage names between the Dockerfile, docker-compose.yaml, and package.json build scripts.

Changes

1. Dockerfile Stage Naming

  • Production stage: Properly named as bolt-ai-production (line 33)
  • Development stage: Properly named as development (line 81)
  • Both stages now have clear, consistent naming that matches the build scripts

2. docker-compose.yaml Target References

  • app-prod service: Uses target: bolt-ai-production (line 7)
  • app-dev service: Uses target: development (line 43)
  • Updated to match the new Dockerfile stage names

3. package.json Build Scripts

  • dockerbuild:prod: Correctly targets --target bolt-ai-production (line 26)
  • dockerbuild: Correctly targets --target development (line 27)
  • Updated to use the correct stage names

Testing

Users can now successfully build Docker images using:

  • npm run dockerbuild - for development
  • npm run dockerbuild:prod - for production
  • docker-compose up - for docker-compose based deployments

Impact

  • ✅ Fixes the "bolt-ai-development" not defined error
  • ✅ Enables successful Docker builds for both development and production
  • ✅ Maintains backward compatibility with existing deployment workflows
  • ✅ Aligns all Docker-related configuration files

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

Stijnus and others added 6 commits September 16, 2025 11:39
- 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
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 <[email protected]>
…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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error trying to build via Docker
1 participant