Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Docker Compose Generator Bundle

Docker Compose Generator Bundle Laravel Package

klke/docker-compose-generator-bundle

A Symfony bundle that generates Docker Compose configuration for PHP projects, helping you define services and scaffold container-based development environments from application config. It aims to simplify and standardize local Docker setups and reduce hand-written YAML.

View on GitHub
Deep Wiki
Context7

Generate docker-compose.yml file to test your projects

Frequently asked questions about Docker Compose Generator Bundle
Is klke/docker-compose-generator-bundle compatible with Laravel?
It is a Symfony bundle, not a Laravel package. It ships a DependencyInjection extension, a configuration tree, and console command wiring, none of which Laravel's container auto-discovers. There is no service provider, no Artisan surface, and no publishable config, so registering it means bootstrapping Symfony DI inside your Laravel application. For most Illuminate codebases that is an architectural mismatch rather than a routine install step.
How does klke/docker-compose-generator-bundle compare to laravel/sail?
Sail is first-party, Artisan-native, and maintained alongside Laravel; it gives you a docker-compose.yml plus sail up and artisan sail:* commands out of the box. This bundle instead builds compose YAML from declarative Symfony configuration, which targets the same problem space with none of the Laravel integration. If you already use Sail or a committed compose file, the bundle adds nothing Sail does not already cover.
Can I use klke/docker-compose-generator-bundle as a standalone YAML generator without Symfony?
That is the only integration path worth testing, since the Symfony binding layer is unusable outside Symfony. The generator reads service definitions and emits a docker-compose.yml, so in principle you could invoke it from a shell script or CI step as a dev dependency. Whether it accepts non-Symfony input depends on whether bundle registration is a hard prerequisite, so inspect vendor/klke/docker-compose-generator-bundle/DependencyInjection/Configuration.php for the real option set first.
How do I install klke/docker-compose-generator-bundle in a Laravel project?
composer require --dev klke/docker-compose-generator-bundle puts the code in vendor, but installation is the easy part. You then need Symfony bundle registration and the configuration tree to be loaded, which Laravel does not do, and pulling in Symfony DI and config components risks collisions with the Symfony packages Laravel already pins transitively. Treat any install as a time-boxed spike on a throwaway branch, not a dependency you merge.
What can I configure with klke/docker-compose-generator-bundle?
The bundle lets you declare services and environment settings in Symfony configuration and generates a ready-to-use docker-compose.yml from them, replacing hand-maintained YAML. That covers service definitions and environment options for a local development stack and helps keep compose files consistent across projects. The output still has to track Docker Compose spec revisions and current PHP image tags, and drift there is the main long-term risk with generated infrastructure.
Is klke/docker-compose-generator-bundle actively maintained?
The public signals point to a single-author project with no consumer base: roughly 4 stars, zero dependents, and a popularity score around 0.02. There is no production evidence base or downstream validation, so adopting it would make you the first real-world use. Check the last commit date and whether issues and pull requests get responses before you spend any time on an evaluation.
Is it safe to use klke/docker-compose-generator-bundle in a production application?
It is development tooling, so its blast radius is limited to local and CI container configuration rather than runtime application code. It still means an unvetted, single-maintainer package influencing how your containers are configured and how CI behaves. If you experiment, review the generated output, pin the version, and keep the compose file under review like any other infrastructure change.
What are the alternatives to generating docker-compose.yml in a Laravel project?
laravel/sail plus a committed docker-compose.yml is the standard answer: first-party, Artisan-native, and backed by a maintainer with an incentive to track upstream Docker and PHP changes. If you genuinely need per-suite or declarative service definitions for CI, a small internal generator or a handful of checked-in compose files is cheaper than adopting an external template engine. Sail plus committed test topologies covers the same ground with a large support corpus behind it.
Does the generated docker-compose.yml stay up to date with Docker Compose spec changes?
Only as quickly as the maintainer updates the package, which on a single-author, zero-dependent project is the core risk. Generated compose files age against Compose spec revisions and PHP image tags, and silent divergence between generated infra and real test requirements is the expensive failure mode: tests pass locally, fail in CI, and the root cause is a file nobody reviews. Committing and reviewing the YAML yourself keeps that drift visible.
What should I check before adopting a Symfony bundle in a Laravel application?
Start with whether the package needs framework bootstrap at all, or whether the useful logic can run standalone from a script or CI step. Then check the real configuration surface in vendor/.../DependencyInjection/Configuration.php, which Compose spec and PHP image tags it emits, whether those are configurable, and the project's last commit and issue activity. Finally, name the specific requirement that Sail plus a committed compose file fails to meet; if you cannot, the bundle is not solving a problem you have.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource