Download the PHP package afterflow/chisel without Composer
On this page you can find all versions of the php package afterflow/chisel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package chisel
Work In Progress. This means that the API may change at any time.
Afterflow Chisel
Chisel is a lightweight, extensible docker compose wrapper written in PHP.
Requirements
Laravel, Docker and docker-compose.
Installation
Grab a fresh installation of Laravel:
Install Chisel via composer:
Then run:
Done! You have a Caddy Web server at http://localhost, phpMyAdmin at http://localhost:8080.
MySQL, Queue Worker and Workspace with cron are running on background.
Chisel vs Vessel
Vessel by Chris Fidao is a nice little wrapper around docker-compose. It's written in bash and doesn't require php to be installed on local machine.
Extending behind basic containers is done through editing docker-compose file.
Chisel defines it's services using php classes (still relying on docker-compose under the hood).
In Chisel, the project configuration is defined in docker/docker.php
.
You can easily extend or reconfigure services, and now you can also ship some Chisel Service classes with your composer package or reuse them when scaffolding new projects.
Chisel vs Laradock
Laradock is all-in-one all-transparent all-purpose collection of Docker images for Laravel. In fact, Chisel is using some of it's developments but in a slightly opinionated way.
Because of the nature of Laradock's images, build times may be really big and you would need to build and publish intermediate images to make this work with multiple projects/servers. Also, configuring Laradock might get a little overwhelming. Instead, you can build an image with Laradock and then use it with Chisel.
Chisel vs Laravel Valet
Docker on Mac uses slow virtualization and hence, native server software runs faster than dockerized version. Because of this, you might prefer using Valet for the Web stack. Chisel will still be helpful though. For example, you can run Browserless or Redis or Kibana with Chisel and everything else with Valet / native.
Chisel vs Laravel Homestead
Ideally, Chisel should be used over Homestead in all cases. The goal of Chisel is to provide the same level of convenience Homestead provides, but with a production-ready Docker environment and much better extensibility.
Chisel vs docker-compose
Currently, Chisel is using docker-compose under the hood, providing another level of abstraction to make compose configurable with PHP, and hence, extensible through Composer packages.
Using Chisel over Compose just makes scaffolding easier and faster when using on multiple projects on multiple servers, because you can just composer require
everything you need without the need to bundle compose files and copy/paste them over and over into new projects.
Basic Usage Examples
Try to migrate the database from your host machine:
Same but from inside dockerized workspace
Notice how it just works with MySQL smoothly out of the box from both host machine and container with a single default .env
file.
Compile frontend assets from workspace container:
See MySQL logs:
Execute arbitrary command on container:
Execute a shortcut command:
Configuration
Run the following command to publish everything:
This will create a docker
directory in the project root.
docker/docker.php
Testing
License
The MIT License (MIT).