diff --git a/.gitignore b/.gitignore index 0888f64d..a10fc659 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,11 @@ /cfg/php-fpm-7.1/*.ini /cfg/hhvm-latest/*.ini +# gh-pages +docs/Gemfile +docs/Gemfile.lock +docs/_site/ +docs/view-page.sh ###################################### diff --git a/docs/README.md b/docs/README.md index c813d6cc..e43cec02 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,28 +1,32 @@ -# Devilbox Documentation +# Devilbox -[Home](https://github.com/cytopia/devilbox) | -Overview | -[Configuration](Configuration.md) | -[Usage](Usage.md) | -[Updating](Updating.md) | -[Info](Info.md) | -[PHP Projects](PHP_Projects.md) | -[Emails](Emails.md) | -[Logs](Logs.md) | -[Intranet](Intranet.md) | -[FAQ](FAQ.md) +| **Overview** | **Installing** | **Updating** | **Configuration** | **Usage** | **Technical** | **FAQ** | ----- +--- -## Overview -![Devilbox](img/devilbox-dash.png) +### Dockerized LAMP/MEAN stack -This is a brief overview to get you started as quick as possible. For in-depth documentation use the navigation above. +

The devilbox is a modern and highly customisable LAMP and MEAN stack replacement based purely on docker and docker-compose running on all major platforms. It supports an unlimited number of projects for which vhosts and DNS records are created automatically. Email catch-all and popular development tools will be at your service as well.

+ +Devilbox + + +### Supported Host OS + +

Don't worry about switching computers. The devilbox will run on all major operating systems.

+ +
+ Linux support + OSX support + Windows support +
### Install, Configure and Start +

Your whole development stack is up and running in a few simple steps.

+ ```shell # Get the soures $ git clone https://github.com/cytopia/devilbox @@ -32,56 +36,124 @@ $ cd devilbox $ cp env-example .env $ vim .env -# Start your container +# Start your daemons $ docker-compose up ``` -### Create projects -Inside the `.env` file you will find two important variables: -1. `HOST_PATH_HTTPD_DATADIR` -2. `TLD_SUFFIX` +### Run exactly what you need -The first one defines the root path for all your projects and the second one defines your desired domain suffix (default: `loc`). Inside the `HOST_PATH_HTTPD_DATADIR` folder you will have to create the following generic directory structure: `/htdocs`. Files from the `htdocs` folder are then served via `http://.`. +

Choose your required daemons and select a version. Any combination is possible.
This will allow you, to always exactly simulate your production environment locally during development.

-**TL;DR (easy)** - - - Assuming `TLD_SUFFIX` equals `loc` - - Assuming `HOST_PATH_HTTPD_DATADIR` equals `/shared/httpd/` - - Assuming desired project name equals `my-new-project` - - `mkdir -p /shared/httpd/my-new-project/htdocs` - - `echo "127.0.0.1 my-new-project.loc" | sudo tee --append /etc/hosts` - - `curl http://my-new-project.loc` - - +| Apache | Nginx | PHP | MySQL | MariaDB | PgSQL | Redis | Memcached | MongoDB | +|------- |---------|------|------ |---------|-------|-------|-----------|---------| +| 2.2 | stable | 5.4 | 5.5 | 5.5 | 9.1 | 2.8 | 1.4.21 | 2.8 | +| 2.4 | mainline| 5.5 | 5.6 | 10.0 | 9.2 | 3.0 | 1.4.22 | 3.0 | +| | | 5.6 | 5.7 | 10.1 | 9.3 | 3.2 | 1.4.23 | 3.2 | +| | | 7.0 | 8.0 | 10.2 | 9.4 | | ... | 3.4 | +| | | 7.1 | | 10.3 | 9.5 | | 1.4.36 | 3.5 | +| | | HHVM | | | 9.6 | | latest | | -**TL;DR (pro)** +### Run only what you need - - `export project=my-new-project` - - `. .env` - - `mkdir -p ${HOST_PATH_HTTPD_DATADIR}/${project}/htdocs` - - `echo "127.0.0.1 ${project}.${TLD_SUFFIX}" | sudo tee --append /etc/hosts` - - `curl http://${project}.${TLD_SUFFIX}` +

You are not forced to load the whole stack everytime. Only bring up what you really need.
It is also possible to add or remove daemons while the stack is already running.

-Here is a more complete example for the directory structure: -``` - project1/ - htdocs/ - project2/ - htdocs/ - some-random-name/ - htdocs -> ./some-dir/ # <-- symlinks are also possible - some-dir/ - my-website.com/ - htdocs -> /shared/httpd/site.com/ # <-- symlinks are also possible +```shell +# Load traditional lamp stack only +$ docker-compose up httpd php mysql + +# Add redis to the running stack +$ docker-compose up redis + +# Stop MySQL from the current stack +$ docker-compose stop mysql ``` -You will then have to extend `/etc/hosts` with your created foldernames plus the tld suffix: -``` -127.0.0.1 project1.loc -127.0.0.1 project2.loc -127.0.0.1 some-random-name.loc -127.0.0.1 my-website.com.loc + +### Introduction Videos + +

Head over to youtube for a quick introduction and see for yourself how easily new projects can be created.

+ +
+ + +
+ + +### Batteries included + +

No need to download external tools. Everything is bundled, up-to-date and available inside the containers.

+ +
+ Devilbox + Devilbox + Devilbox + Devilbox + Devilbox +
+ Devilbox + Devilbox + Devilbox + Devilbox + Devilbox + Devilbox + Devilbox +
+ + +### Supported Frameworks and CMS + +

There is nothing special about the devilbox, so any framework or CMS that will work with normal LAMP/MEAN stacks will work here as well. However in order to make double sure, a few popular applications have been explicitly tested.

+ +
+ CakePHP + Drupal + PhalconPHP + Wordpress + Yii +
+ + +### Devilbox Intranet + +

Once the devilbox is up and running, you can visit the bundled intranet on http://localhost.
The intranet is not just a simple dash, it provides many useful tools:

+ +
+ Container Health | DNS Status | Available vHosts | Emails | Databases | Effective Configuration
+ +
+ + +### Security + +

Be aware that the docker service is running with root privileges on your system (like any other webserver for example). The devilbox is using a mix of official docker images and custom images. All integrated containers are available on Github and can be reviewed at any time.

+ + +### Up-to-dateness + +

Docker containers are pushed to Docker Hub frequently.
It should be enough for you to pull updated images on a regeular basis.

+ +```shell +$ docker-compose pull ``` -Contents inside the `htdocs` folder will be server via the configured domain automatically. So in order to access project2's htdoc folder go to `http://project2.loc` (assuming `TLD_SUFFIX` was `loc`) +

However, if a new minor version (PHP for example) has just been released and you want to use it right away with the devilbox, you can simply *git clone* the docker repository and rebuild the container. Each container repository contains a shell script for easy building.

+ +```shell +# Download PHP 7.1 repository +$ git clone https://github.com/cytopia/docker-php-fpm-7.1 + +# Rebuild the container in order to get the latest minor/patch version +$ cd docker-php-fpm-7.1 +$ ./build/docker-rebuild.sh +``` + + +### Integration Tests + +
+ +
+ +

In order to make sure everything always runs stable and as expected, the devilbox makes heavy use of integration tests. You can head over to Travis-CI and have a look at stable and nightly builds.

diff --git a/docs/_config.yml b/docs/_config.yml index c7418817..34f21e0b 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1 +1,4 @@ -theme: jekyll-theme-slate \ No newline at end of file +theme: jekyll-theme-slate +kramdown: + input: GFM + hard_wrap: false diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 00000000..1793825c --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,62 @@ + + + + + + + + + + + + {{ site.title | default: site.github.repository_name }} + + + + + +
+
+ View on GitHub + +

{{ site.title | default: site.github.repository_name }}

+

{{ site.description | default: site.github.project_tagline }}

+ + {% if site.show_downloads %} +
+ Download this project as a .zip file + Download this project as a tar.gz file +
+ {% endif %} +
+
+ + +
+
+ {{ content }} +
+
+ + + + + {% if site.google_analytics %} + + {% endif %} + + diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss new file mode 100644 index 00000000..93baa1b9 --- /dev/null +++ b/docs/assets/css/style.scss @@ -0,0 +1,46 @@ +--- +--- + +@import "{{ site.theme }}"; + +.inner { + max-width: 850px; + position: relative; + padding: 20px 10px; + margin: 0 auto; +} +#header_wrap { + background-image: url('/assets/img/devilbox-dash.png'); + background-repeat: no-repeat; + background-size: cover; + min-height: 100%; +} +h1, h2, h3 { + text-align: center; +} +h2, h3 { + margin-top:30px; +} + + +table { + margin: auto; + width: 50%; + padding: 10px; +} + +.center { + text-align: center; +} +img.battery { + /*border: 1px solid black;*/ + border-radius: 15px; +} + +/* remove gh pages link */ +footer.inner p { + display: none; +} +footer.inner p.copyright { + display: block; +} diff --git a/docs/assets/img/devilbox-dash.png b/docs/assets/img/devilbox-dash.png new file mode 100644 index 00000000..51ab114a Binary files /dev/null and b/docs/assets/img/devilbox-dash.png differ diff --git a/docs/img/devilbox-dash.png b/docs/img/devilbox-dash.png index ac12a8d8..60d5b19b 100644 Binary files a/docs/img/devilbox-dash.png and b/docs/img/devilbox-dash.png differ diff --git a/docs/img/logos/adminer.png b/docs/img/logos/adminer.png new file mode 100644 index 00000000..8be6f9a8 Binary files /dev/null and b/docs/img/logos/adminer.png differ diff --git a/docs/img/logos/cake.png b/docs/img/logos/cake.png new file mode 100644 index 00000000..ad1238c7 Binary files /dev/null and b/docs/img/logos/cake.png differ diff --git a/docs/img/logos/composer.png b/docs/img/logos/composer.png new file mode 100644 index 00000000..cb76aed5 Binary files /dev/null and b/docs/img/logos/composer.png differ diff --git a/docs/img/logos/dns.png b/docs/img/logos/dns.png new file mode 100644 index 00000000..a5040a10 Binary files /dev/null and b/docs/img/logos/dns.png differ diff --git a/docs/img/logos/drupal-console.png b/docs/img/logos/drupal-console.png new file mode 100644 index 00000000..d49ef0f2 Binary files /dev/null and b/docs/img/logos/drupal-console.png differ diff --git a/docs/img/logos/drupal.png b/docs/img/logos/drupal.png new file mode 100644 index 00000000..7bb57210 Binary files /dev/null and b/docs/img/logos/drupal.png differ diff --git a/docs/img/logos/drush.png b/docs/img/logos/drush.png new file mode 100644 index 00000000..40e659d0 Binary files /dev/null and b/docs/img/logos/drush.png differ diff --git a/docs/img/logos/email.png b/docs/img/logos/email.png new file mode 100644 index 00000000..00042e21 Binary files /dev/null and b/docs/img/logos/email.png differ diff --git a/docs/img/logos/git.png b/docs/img/logos/git.png new file mode 100644 index 00000000..85f9cc71 Binary files /dev/null and b/docs/img/logos/git.png differ diff --git a/docs/img/logos/nodejs.png b/docs/img/logos/nodejs.png new file mode 100644 index 00000000..da554dc8 Binary files /dev/null and b/docs/img/logos/nodejs.png differ diff --git a/docs/img/logos/npm.png b/docs/img/logos/npm.png new file mode 100644 index 00000000..6a5c751e Binary files /dev/null and b/docs/img/logos/npm.png differ diff --git a/docs/img/logos/opcachegui.png b/docs/img/logos/opcachegui.png new file mode 100644 index 00000000..2ece5db1 Binary files /dev/null and b/docs/img/logos/opcachegui.png differ diff --git a/docs/img/logos/phalcon.png b/docs/img/logos/phalcon.png new file mode 100644 index 00000000..a06a2016 Binary files /dev/null and b/docs/img/logos/phalcon.png differ diff --git a/docs/img/logos/phpmyadmin.png b/docs/img/logos/phpmyadmin.png new file mode 100644 index 00000000..72d6cc20 Binary files /dev/null and b/docs/img/logos/phpmyadmin.png differ diff --git a/docs/img/logos/wordpress.png b/docs/img/logos/wordpress.png new file mode 100644 index 00000000..95dedce1 Binary files /dev/null and b/docs/img/logos/wordpress.png differ diff --git a/docs/img/logos/wp-cli.png b/docs/img/logos/wp-cli.png new file mode 100644 index 00000000..c3c2cf3c Binary files /dev/null and b/docs/img/logos/wp-cli.png differ diff --git a/docs/img/logos/yii.png b/docs/img/logos/yii.png new file mode 100644 index 00000000..6928aff8 Binary files /dev/null and b/docs/img/logos/yii.png differ