PHPackages                             afterflow/chisel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. afterflow/chisel

ActiveLibrary

afterflow/chisel
================

Work in progress

0.4.2(3y ago)3102MITPHPCI failing

Since Feb 26Pushed 3y agoCompare

[ Source](https://github.com/afterflow/chisel)[ Packagist](https://packagist.org/packages/afterflow/chisel)[ RSS](/packages/afterflow-chisel/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (13)Used By (0)

Work In Progress. This means that the API may change at any time.

Afterflow Chisel
================

[](#afterflow-chisel)

Chisel is a lightweight, extensible docker compose wrapper written in PHP.

Requirements
------------

[](#requirements)

Laravel, Docker and docker-compose.

Installation
------------

[](#installation)

Grab a fresh installation of Laravel:

```
laravel new chisel-project
```

Install Chisel via composer:

```
composer require afterflow/chisel
```

Then run:

```
php artisan chisel:up
```

Done! You have a Caddy Web server at , phpMyAdmin at .

MySQL, Queue Worker and Workspace with cron are running on background.

### Chisel vs Vessel

[](#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

[](#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

[](#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

[](#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

[](#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
--------------------

[](#basic-usage-examples)

Try to migrate the database from your host machine:

```
php artisan migrate
```

Same but from inside dockerized workspace

```
php artisan chisel exec workspace migrate
```

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:

```
php artisan chisel:workspace
npm install
npm run dev
```

See MySQL logs:

```
php artisan chisel:logs mysql
```

Execute arbitrary command on container:

```
php artisan chisel:exec caddy sh
```

Execute a shortcut command:

```
php artisan chisel:exec mysql @dump
```

Configuration
-------------

[](#configuration)

Run the following command to publish everything:

```
php artisan chisel:install
```

This will create a `docker` directory in the project root.

`docker/docker.php`

```
