Aller au contenu
← Retour aux projets

Godbox

The GodBox!

The Godbox is a devilbox inspired project fosed on advanced Laravel developer. The Godbox is a modern and highly customisable dockerized PHP stack supporting full LAMP and MEAN and running on all major platforms. The main goal is to easily switch and combine any version required for local development. It supports an unlimited number of projects for which vhosts, SSL certificates and DNS records are created automatically. Reverse proxies per project are supported to ensure listening server such as NodeJS can also be reached. Email catch-all and popular development tools will be at your service as well. Configuration is not necessary, as everything is already pre-setup.

Furthermore, the Godbox provides an identical and reproducible development environment for different host operating systems.

Requirements

Linux OSX Windows Plus Docker

#Architecture

#Available Stacks

The Godbox aims to be a swiss army knife for local development by providing you all the services you would ever need. To get an idea about the architecture behind it and to also see what's available have a look at the following diagrams and tables.

#Available Container

The following table lists all integrated and pre-configured Docker container shipped by the Godbox. Only the webserver and PHP container are mandatory, all others are optional and don't need to be started.

Each of them is also available in multiple different versions in order to reflect your exact desired environment.

Accel Web App SQL NoSQL Queue / Search ELK Utils
HAProxy Apache PHP MariaDB Memcached RabbitMQ ElasticSearch Bind
Varnish Nginx Python (Flask) MySQL MongoDB Solr Logstash Blackfire
PerconaDB Redis Kibana MailHog
PostgreSQL Ngrok
Jenkins

#Usage

#Quick start

Linux and MacOS Windows
# Get the Godbox
git clone https://github.com/icarojobs/godbox devilbox
# Create docker-compose environment file
cd devilbox
mkdir jenkins
mkdir dumps
cp env-example .env
# Edit your configuration
vim .env
# Start all container
docker-compose up
1. Clone https://github.com/icarojobs/godbox to C:\devilbox with Git for Windows

2. Copy C:\devilbox\env-example to C:\devilbox\.env

3. Edit C:\devilbox\.env

4. Open a terminal on Windows and type:


# Start all container
C:\devilbox> docker-compose up

#Selective start

The above will start all containers, you can however also just start the containers you actually need. This is achieved by simply specifying them in the docker-compose command.

docker-compose up httpd php mysql redis

#Run different versions

Every single attachable container comes with many different versions. In order to select the desired version for a container, simply edit the .env file and uncomment the version of choice. Any combination is possible.

Apache Nginx PHP MySQL MariaDB Percona PgSQL Redis Memcached MongoDB
2.2 stable 5.2[1] 5.5 5.5 5.5 9.0 2.8 1.4 2.8
2.4 mainline 5.3 5.6 10.0 5.6 9.1 3.0 1.5 3.0
5.4 5.7 10.1 5.7 9.2 3.2 1.6 3.2
5.5 8.0 10.2 8.0 9.3 4.0 latest 3.4
5.6 10.3 9.4 5.0 3.6
7.0 10.4 9.5 6.0 4.0
7.1 10.5 9.6 latest 4.2
7.2 ... 4.4
7.3 12.3 latest
7.4 12.4
8.0[2] 13.0
8.1[2] latest

[1] PHP 5.2 is available to use, but it is not officially supported. The Godbox intranet does not work with this version as PHP 5.2 does not support namespaces. Furthermore PHP 5.2 does only work with Apache 2.4, Nginx stable and Nginx mainline. It does not work with Apache 2.2. Use at your own risk.

[2] PHP 8.0 / PHP 8.1 are upcoming unreleased versions of PHP, which are directly built out of their official git branches every night to assure you will leverage their latest features.

#Additional services

Additionally to the default stack, there are a variety of other services that can be easily enabled and started.

Python (Flask) Blackfire ELK MailHog Ngrok RabbitMQ Solr HAProxy Varnish
2.7 1.8 5.x.y v1.0.0 2.x 3.6 5 1.x 4
... ... 6.x.y latest 3.7 6 5
3.7 1.18.0 7.x.y latest 7 6
3.8 latest latest latest

#Enter the container

You can also work directly inside the php container. Simply use the bundled scripts shell.sh (or shell.bat for Windows). The PS1 will automatically be populated with current chosen php version. Navigate the the Godbox directory and type the below listed command:

Linux and MacOS Windows
host> ./shell.sh
godbox@php-7.0.19 in /shared/httpd $
C:\godbox> shell.bat
godbox@php-7.0.19 in /shared/httpd $

Your projects can be found in /shared/httpd. DNS records are automatically available inside the php container. Also every other service will be available on 127.0.0.1 inside the php container (tricky socat port-forwarding).

#License

MIT License

Copyright (c) 2016 icarojobs

Nouvelle version disponible.