This toolbox helps you manage local Docker environments for different type of PHP projects. There is a built-in skeleton for Drupal, Magento 2, OroCommerce, Sylius, and Symfony.
It allows you to create a new environment from scratch without impacting the source code of your project. It also offers the ability to have a global overview of all installed environments and perform actions without having to be in the project directory. Native commands are still available since this is a wrapper of Docker Compose.
- Docker and Docker Compose.
- Mutagen to improve performance because Docker can be painfully slow on macOS with some projects.
- mkcert (optional) to make locally trusted development certificates because the HTTPS has become the norm.
Last but not least, this package currently only supports macOS.
You can install origami
with Composer like any PHP dependency.
composer global require ajardin/origami
Once you have installed the binary, you can check the status of the application requirements.
origami --verbose
- Open a terminal in the directory of your project
- Run
origami install
- Configure the environment of your choice
- Run
origami start
- Open your favorite browser on your custom domain or https://127.0.0.1/
The var/docker/
directory of your project contains the environment configuration. Feel free to edit it at your
convenience; it is your configuration now. 😉
Shows real-time usage statistics of the running environment.
Generates a database dump of the running environment.
Restores a database dump of the running environment.
Shows system information and the configuration of the current environment.
Installs an environment for the project in the current directory.
Shows the logs generated in real-time by the running environment.
By default, this command only shows new entries. You can use the --tail=XX
option to view previous entries, and filter
the output by specifying the name of a service (php
for example).
Opens a terminal on the php
service to interact with it.
Prepares Docker images (i.e. pull and build) of a previously installed environment.
Shows the status of the running environment services.
Shows the list and status of all previously installed environments.
Restarts an environment previously started.
Shows instructions for configuring your terminal to manually use Docker commands.
Starts an environment previously installed.
Stops an environment previously started.
Uninstalls an environment by deleting all Docker data and associated configuration.
You can either run this command from the directory where the project has been installed, or pass its name as an argument to the command.
Updates the configuration of a previously installed environment.
This command must be run after each origami
update to ensure that you benefit from all the latest improvements.
Your manual changes are overwritten by this action.
origami
relies on Symfony, a popular PHP framework.
Unlike common Symfony projects, we use Box to package the tool into a single binary file so that it's possible to share it without installing all its dependencies. Otherwise, it could potentially bring conflicts if other tools with outdated dependencies are present on the local machine.
Why PHP? The main reason is that origami
will focus on environments dedicated to PHP applications, and we would
like to facilitate the contribution process by using something well-known by our end-users.
There is a Makefile
with the most useful commands (e.g. fixing the coding style or running the tests).
make
Contributions, issues and feature requests are welcome! Feel free to check issues page.
Copyright © Alexandre Jardin. origami
is an open-sourced software licensed under the MIT license.