PHPackages                             percymamedy/dcompose - 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. [CLI &amp; Console](/categories/cli)
4. /
5. percymamedy/dcompose

Abandoned → [percymamedy/dcompose](/?search=percymamedy%2Fdcompose)ArchivedProject[CLI &amp; Console](/categories/cli)

percymamedy/dcompose
====================

Laradock scaffolding cli tool.

v0.1.0-beta.4(6y ago)22[3 PRs](https://github.com/percymamedy/Dcompose/pulls)MITPHPPHP ^7.2

Since Feb 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/percymamedy/Dcompose)[ Packagist](https://packagist.org/packages/percymamedy/dcompose)[ RSS](/packages/percymamedy-dcompose/feed)WikiDiscussions develop Synced 3d ago

READMEChangelog (3)Dependencies (8)Versions (9)Used By (0)

 Dcompose
----------

[](#---dcompose)

 [![Latest Stable Version](https://camo.githubusercontent.com/e459931b86e3b93516bd240c437aaf9f77e987ad58e9f62582f7acf881355e01/68747470733a2f2f706f7365722e707567782e6f72672f70657263796d616d6564792f64636f6d706f73652f762f737461626c65)](https://packagist.org/packages/percymamedy/dcompose) [![Latest Unstable Version](https://camo.githubusercontent.com/e0a317b6475697c1f2d7ed78344d2516b7c1aa0f1af9e5a763fb460710a345d9/68747470733a2f2f706f7365722e707567782e6f72672f70657263796d616d6564792f64636f6d706f73652f762f756e737461626c65)](https://packagist.org/packages/percymamedy/dcompose) [![Build Status](https://camo.githubusercontent.com/57bbf16e6b3595903ee08765f61862da726fc18c5f2dd50c7d61ec8ce2067f9b/68747470733a2f2f7472617669732d63692e6f72672f70657263796d616d6564792f44636f6d706f73652e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/percymamedy/Dcompose) [![License](https://camo.githubusercontent.com/ce191c15a1ff44eb8a12ee9ee036e643cfeaa6220fb3ee6d9098f8961aab7871/68747470733a2f2f706f7365722e707567782e6f72672f70657263796d616d6564792f64636f6d706f73652f6c6963656e7365)](https://packagist.org/packages/percymamedy/dcompose) [![Total Downloads](https://camo.githubusercontent.com/c5294eb0386fa7c58be2b2746776b17f43e7e4da72a2aaf89e91db29eeb994d5/68747470733a2f2f706f7365722e707567782e6f72672f70657263796d616d6564792f64636f6d706f73652f646f776e6c6f616473)](https://packagist.org/packages/percymamedy/dcompose)

Introduction
------------

[](#introduction)

[Laradock](https://laradock.io/) is an awesome tool that helps with building a [Docker](https://www.docker.com/) environment for running your Laravel or PHP apps.

However, it can be quite a pain to identify and use only specific components needed for your app. Most of the time you'll find yourself using only few images and remembering which one (So you can run docker-compose up -d ..) for which project is a pain.

I built Dcompose because I was always finding myself copying the images' Docker files needed from laradock to my projects and recreating the docker-compose.yml file everytime for each project. Inspired by [Composer](https://getcomposer.org/), I embarked on a quest to build my own tool that would "require" in my projects only the components that I needed and update automatically my docker-compose.yml file.

This is how Dcompose was born. I do not know where this library will end up but my hope is for people who've had the same issue as me might find it useful.

License
-------

[](#license)

Dcompose is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

### Installation

[](#installation)

Fisrt make sur you have Docker and Docker Compose installed on your system. Check out [Docker](https://docs.docker.com/install/)and [Docker Compose](https://docs.docker.com/compose/install/) installation docs.

Then, download Dcompose using Composer:

```
$ composer global require percymamedy/dcompose
```

Make sure to place composer's system-wide vendor bin directory in your $PATH so the Dcompose executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include:

- macOS: $HOME/.composer/vendor/bin
- GNU / Linux Distributions: $HOME/.config/composer/vendor/bin

### Usage

[](#usage)

#### Init command

[](#init-command)

With the init command you may start defining which services you want to use in your project. You should run this command in the root of your project like follows:

```
$ dcompose init
```

This is an interacting command which will ask you about your project name and services which you'll use. Services are just the Laradock services which exists, check out [laradock's github repo](https://github.com/laradock/laradock)to get a sense of all services which you can require.

After running this command a new `.docker/` folder will be created into your project's root directory which will contain only the services and correct `docker-compose.yml` file layout.

You will also find a `.env` file inside the .docker folder. You can modify this file to change values specific for your environment.

Now you may run the following command inside the `.docker/` folder to run your project :

```
$ docker-compose up -d
```

#### Require command

[](#require-command)

If you've missed a service or you need another service from laradock you can run the require command as follows:

```
$ dcompose require
```

Where `` is the name of one of laradock's services. This will then add the service to your `.docker/` folder and `docker-compose.yml` file.

Now you may run the following command inside the `.docker/` folder :

```
$ docker-compose up -d
```

or :

```
$ ./containers start
```

If you've ran the `generate-tools` command.

#### Remove command

[](#remove-command)

You can remove a service using the following command :

```
$ dcompose remove
```

This is not going to remove the service folder from the `.docker/` folder and correct sections from `docker-compose.yml` file.

However the container, image and volume created for this service will still be on your system. To remove them completely you should run docker commands :

```
$ docker rm
```

```
$ docker rmi
```

```
$ docker volume rm
```

#### Generate tools command

[](#generate-tools-command)

Generating the commands line tools helps in running and executing docker containers from laradock :

```
$ dcompose generate-tools
```

A new `containers` script will be created which gives you access to three options:

Start docker containers:

```
$ ./containers start
```

Stop docker containers:

```
$ ./containers stop
```

Ssh into workspace container after starting contaners :

```
$ ./containers workspace
```

#### Refresh command

[](#refresh-command)

laradock files are fetched and cached such that `require`, `remove` and `init` command are carried out faster without the need to refetch files from dist all the time.

However, there is not way of knowing when laradock has been updated, thus the `refresh` command allows us to refresh the cached laradock files :

```
$ dcompose refresh
```

### Road map v0.2

[](#road-map-v02)

- Make code more consistent with an object oriented approach.
- Use something like doctrine cache for managing laradock file hence eliminating the need for refresh command by having expiration.

### Road map v0.3

[](#road-map-v03)

- Add a manifest file in JSON or YML that will contain all docker containers hence eliminating the need for commiting the .docker folder.

### Credits

[](#credits)

Big Thanks to all developers who worked hard to create something amazing!

### Creator

[](#creator)

[![Percy Mamedy](https://camo.githubusercontent.com/209b20c0fcf36bda6ce4e0c8e26a91d6ad79d6c17592eef0d1fd23c175a5eddf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f417574686f722d50657263792532304d616d6564792d6f72616e67652e737667)](https://twitter.com/PercyMamedy)

Twitter: [@PercyMamedy](https://twitter.com/PercyMamedy)
GitHub: [percymamedy](https://github.com/percymamedy)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~139 days

Total

4

Last Release

2217d ago

PHP version history (2 changes)v0.1.0-beta1PHP ^7.1.3

v0.1.0-beta.3PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/3db0a14dead2c0a8eec8526b1cfa43aabff2e4cde044fefb9d4ddccb0fbc8128?d=identicon)[percymamedy](/maintainers/percymamedy)

---

Top Contributors

[![percymamedy](https://avatars.githubusercontent.com/u/11259669?v=4)](https://github.com/percymamedy "percymamedy (27 commits)")

---

Tags

docker-composelaradockscaffoldingcliconsolelaravellaradock

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/percymamedy-dcompose/health.svg)

```
[![Health](https://phpackages.com/badges/percymamedy-dcompose/health.svg)](https://phpackages.com/packages/percymamedy-dcompose)
```

###  Alternatives

[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
