PHPackages                             mglaman/platform-docker - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. mglaman/platform-docker

AbandonedArchivedLibrary[DevOps &amp; Deployment](/categories/devops)

mglaman/platform-docker
=======================

An opinionated platform stack for Drupal with Docker Compose

v1.0.12(8y ago)4614715[9 issues](https://github.com/mglaman/platform-docker/issues)[4 PRs](https://github.com/mglaman/platform-docker/pulls)GPL-2.0+PHP

Since Sep 9Pushed 8y ago7 watchersCompare

[ Source](https://github.com/mglaman/platform-docker)[ Packagist](https://packagist.org/packages/mglaman/platform-docker)[ RSS](/packages/mglaman-platform-docker/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (19)Used By (0)

platform-docker [![Build Status](https://camo.githubusercontent.com/fd4609bff15550f972445a2a68446e1e2b9c20d0921f330f5c8d49808fec8acc/68747470733a2f2f7472617669732d63692e6f72672f6d676c616d616e2f706c6174666f726d2d646f636b65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mglaman/platform-docker)
====================================================================================================================================================================================================================================================================================================================

[](#platform-docker-)

**Platform Docker** is a CLI tool for scaffolding docker-compose configuration for PHP projects, currently opinionated at PHP projects. Running `platform-docker`in a directory will create a multi-container application environment for local development.

Currently support is focused at Drupal 7 and Drupal 8. However there is rudimentary WordPress support. Generic PHP applications should be easy to implement.

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

[](#requirements)

- [Composer](https://getcomposer.org/)
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)

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

[](#installation)

First, if you do not have Docker then head over to their [documentation](https://docs.docker.com/) and see how to install for your machine. For OSX and Windows users, make sure you have [Virtual Box](https://www.virtualbox.org/wiki/Downloads) installed and docker-machine configured, follow [these instructions](https://docs.docker.com/machine/get-started/#/create-a-machine) for the later and ensure you have ran `docker-machine create --driver virtualbox default`.

```
composer global require mglaman/platform-docker

```

Usage
-----

[](#usage)

Use within any directory. Until the app itself can scaffold a folder, it's expecting a folder structure of

- /shared (if not present it will be made)
- /www (required, this is your build)
- /repository (not required, but opinionated this is the source of what was built.)
- /tests (default directory it will look for Behat tests, however checks shared and www)

If you are on Mac OS X, export `PLATFORM_DOCKER_MACHINE_NAME` with your Docker machine name. The tool will automatically boot the machine or export its environment information as needed. For example, put `12 export PLATFORM_DOCKER_MACHINE_NAME="vmname"` in your .bash\_profile.

### Features

[](#features)

#### Redis

[](#redis)

There is a redis container available. Currently it can be added by adding the following to .platform-project in the root directory of the project

```
services:
  - redis

```

#### Solr

[](#solr)

An Apache Solr container is available with the default server URI is `http://solr:8983/solr` Currently it can be added by adding the following to .platform-project in the root directory of the project

```
services:
  - solr

```

#### Flamegraphs

[](#flamegraphs)

There is a helper command which patches Drupal to log xhprof items, and then turn them into a flamegraph.

#### Behat tests

[](#behat-tests)

Searches for behat.yml files, laucnches a Selenium (Firefox) container and executes tests.

### Commands

[](#commands)

```
Available commands:
  drush                              Runs a Drush command for environment.
  help                               Displays help for a command
  init                               Setup Platform and Docker Compose files
  link                               Displays link to local environment, with port.
  list                               Lists commands
 docker
  docker:logs                        Tails the logs of a specific service container
  docker:proxy (proxy)               Starts the nginx proxy container
  docker:rebuild                     Rebuild configurations and containers
  docker:restart (reboot)            Restarts the docker containers
  docker:ssh                         Allows for quick SSH into a service container.
  docker:stop (stop)                 Stops the docker containers
  docker:up (start)                  Starts the docker containers
 flamegraph
  flamegraph:create                  Creates a flamegraph from xhprof folder contents.
  flamegraph:setup                   Sets the project up for generating flamegrapghs.
  flamegraph:unpatch                 Unpatches index.php to stop xhprof logging.
 project
  project:behat (behat)              Runs behat test suite for project. Checks ./tests, ./www, ./shared and ./repository by default.
  project:db-sync                    Syncs database from environment to local
 provider
  provider:platformsh (platformsh)   Sets up a Platform.sh project

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 73.6% 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 ~49 days

Recently: every ~77 days

Total

14

Last Release

3260d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/98c03d4d2a6aa9b5ecdfc565e8f90f53f0a8f6c2757048a148b34b166d78266c?d=identicon)[mglaman](/maintainers/mglaman)

---

Top Contributors

[![mglaman](https://avatars.githubusercontent.com/u/3698644?v=4)](https://github.com/mglaman "mglaman (134 commits)")[![alexpott](https://avatars.githubusercontent.com/u/769634?v=4)](https://github.com/alexpott "alexpott (43 commits)")[![andyg5000](https://avatars.githubusercontent.com/u/1800052?v=4)](https://github.com/andyg5000 "andyg5000 (2 commits)")[![mofakhamr](https://avatars.githubusercontent.com/u/7880167?v=4)](https://github.com/mofakhamr "mofakhamr (1 commits)")[![pjcdawkins](https://avatars.githubusercontent.com/u/1465106?v=4)](https://github.com/pjcdawkins "pjcdawkins (1 commits)")[![yograf](https://avatars.githubusercontent.com/u/5279133?v=4)](https://github.com/yograf "yograf (1 commits)")

---

Tags

dockerphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mglaman-platform-docker/health.svg)

```
[![Health](https://phpackages.com/badges/mglaman-platform-docker/health.svg)](https://phpackages.com/packages/mglaman-platform-docker)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[shopware/deployment-helper

Shopware deployment tools

19305.3k5](/packages/shopware-deployment-helper)

PHPackages © 2026

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