Devilbox
A modern Docker LAMP stack and MEAN stack for local development
Install / Use
/learn @cytopia/DevilboxREADME

Quickstart | Examples | Features | The Devilbox Stack | Community | Contributing | Logos | License
<!-- [](https://devilbox.readthedocs.io) [](https://github.com/cytopia/devilbox/actions?workflow=Lint) [](https://github.com/cytopia/devilbox/actions?workflow=Docs) [](https://github.com/cytopia/devilbox/actions/workflows/test-php.yml) [](https://github.com/cytopia/devilbox/actions/workflows/test-httpd.yml) [](https://github.com/cytopia/devilbox/actions/workflows/test-mysql.yml) [](https://github.com/cytopia/devilbox/actions/workflows/test-memcd.yml) [](https://github.com/cytopia/devilbox/actions/workflows/test-mongo.yml) [](https://github.com/cytopia/devilbox/actions/workflows/test-pgsql.yml) [](https://github.com/cytopia/devilbox/actions/workflows/test-redis.yml) --> <!-- <img width="200" style="width:200px;" src="docs/_includes/figures/https/https-ssl-address-bar.png" /><br/> <small><sub>Support for <a href="https://devilbox.readthedocs.io/en/latest/intermediate/setup-valid-https.html">valid https</a> out of the box.</sub></small> -->The Devilbox is a versatile and highly customisable zero-conf PHP Docker stack supporting LEMP and MEAN as well as Websockets, Node, Python and Golang via automated Reverse Proxy integraton.
<br/>
<br/>
The main goal is to provide a reproducible development environment that runs on all major platforms and is able to switch and combine any version you need.
It supports an unlimited number of projects for which vhosts, SSL certificates and DNS records are created automatically.
Email interception and popular development tools will be at your service as well. Configuration is not necessary, as everything is already pre-setup.
<br/>
<br/>
All created projects (frontend or backend) will be able to communicate with one another to support the emulation of a complete microservice architecture or an API landscape.
<br/>
<br/>
Available Architectures: amd64, arm64<br/>
Available PHP Versions: 5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2
🚀 Quickstart
<details><summary>❗ System Requirements</summary> <br/> The Devilbox runs on all major operating systems and its only requirement is <code>Docker</code> and <code>Docker Compose</code>:<br/><br/>
<br/>
Be up and running in 2 minutes.
<details style="margin-bottom:0px;"><summary>🚀 Install and Run: Linux</summary> <h3>Linux: Install</h3>- Download the Devilbox
git clone https://github.com/cytopia/devilbox - Enter the Devilbox git directory
cd devilbox - Copy the default environment file
cp env-example .env
<br/><strong>:warning: Important: </strong> Ensure that nothing is listening on port <code>80</code> and <code>443</code> on your host system. These ports are required by the Devilbox webserver.
- Start
httpd,phpandmysqlcontainer# This step may take a few minutes as required # Docker images have to be pulled initially. # Inside the Devilbox git directory docker-compose up httpd php mysql - Visit http://localhost in your browser
- Download the Devilbox
git clone https://github.com/cytopia/devilbox - Enter the Devilbox git directory
cd devilbox - Copy the default environment file
cp env-example .env
<br/><strong>:warning: Important: </strong> Ensure that nothing is listening on port <code>80</code> and <code>443</code> on your host system. These ports are required by the Devilbox webserver.
- Start
httpd,phpandmysqlcontainer# This step may take a few minutes as required # Docker images have to be pulled initially. # Inside the Devilbox git directory docker-compose up httpd php mysql - Visit http://localhost in your browser
- Clone <code>https://github.com/cytopia/devilbox</code> to <code>C:\devilbox</code> with <a href="https://git-scm.com/downloads">Git for Windows</a>
- Copy <code>C:\devilbox\env-example</code> to <code>C:\devilbox.env</code>
<strong>:warning: Important: </strong> Ensure that nothing is listening on port <code>80</code> and <code>443</code> on your host system. These ports are required by the Devilbox webserver.
<a href="https://devilbox.readthedocs.io/en/latest/howto/terminal/open-terminal-on-win.html">Open a terminal on Windows</a> and start httpd, php and mysql container:
<br/>
- Start
httpd,phpandmysqlcontainer# This step may take a few minutes as required # Docker images have to be pulled initially. # Inside the Devilbox git directory docker-compose up httpd php mysql - Visit http://localhost in your browser
The Devilbox allows you to work on your projects on the host system as well as inside the work container. Your project files will be available at both locations. The workflow ususally is:
- Use your prefered IDE (e.g. PhpStorm) on your host system to add and alter files
- Work inside the container to run common cli tools such as
node,composer,npm,phpcs,webpackand many more.
To enter the work container, simply run ./shell.sh
- On Linux, MacOS and Windows with WSL2
# Inside the Devilbox git directory ./shell.sh - On Windows without WSL2
# Inside the Devilbox git directory ./shell.bat
💡 Examples
Create your first project:
<details><summary>Example: Dummy Project</summary>- Start the container you need:
docker-compose up httpd php mysql - Enter the work container:
./shell.sh - Navigate to
/shared/httpd:cd /shared/httpd - Create your project directory
mkdir dummy-project - Visit http://localhost/vhosts.php<br/>
You will notice that you need to create a
htdocs/directory<br/> <img src="docs/img/example_01-vhost.png" /> - Create
htdocs/directory# Navigate to your project directory cd /shared/httpd/dummy-project # Create htdocs dir mkdir htdocs - Visit http://localhost/vhosts.php<br/> You will see that everything is now setup and your project is created and available<br/> <img src="docs/img/example_02-vhost.png" />
- Create an
index.phpfile# Navigate to your project htdocs directory cd /shared/httpd/dummy-project/htdocs # Create a simple index.php file echo '<?php echo "it works";' > index.php - View your project in the browser: http://dummy-project.dvl.to
Find all the examples in the documentation:
<a target="_blank" title="How to Setup CakePHP on the Devilbox" href="https://devilbox.readthedocs.io/en/latest/examples/setup-cakephp.html"><img width="48" style="width:48px" src="docs/img/logo_fw/cake.png" alt="Devilbox" /></a> <a target="_blank" title="How to Setup CodeIgniter on the Devilbox" href="https://devilbox.readthedocs.io/en/latest/examples/setup-codeigniter.htm
