diff --git a/docs/Examples.md b/docs/Examples.md index 9fe4795e..b0cda939 100644 --- a/docs/Examples.md +++ b/docs/Examples.md @@ -25,7 +25,6 @@ Examples | --- - ## 1. Setup CakePHP ## 2. Setup Drupal diff --git a/docs/Quickstart.md b/docs/Quickstart.md index c1ecfef0..82ceb097 100644 --- a/docs/Quickstart.md +++ b/docs/Quickstart.md @@ -28,6 +28,9 @@ Quickstart | 1. [Run all](#4-1-run-all) 2. [Run selection](#4-2-run-selection) 5. [Project setup](#5-project-setup) + 1. [General setup](#5-1-general-setup) + 2. [Specific Frameworks](#5-2-specific-frameworks) +6. [Enter the PHP Docker container](#6-enter-the-php-docker-container) --- @@ -97,6 +100,8 @@ $ docker-compose up -d httpd php mysql redis ## 5. Project setup +#### 5.1 General setup + **Assumption:** 1. HOST_PATH_TO_HTTPD_DATADIR=**./data/www** @@ -128,3 +133,38 @@ $ ls -l drwxrwxr-x 2 cytopia 4096 Jun 14 08:29 cakephp lrwxrwxrwx 1 cytopia 11 Jun 14 08:29 htdocs -> cakephp/app/webroot/ ``` + +#### 5.2 Specific Frameworks + +Some frameworks use a deep nested directory to serve their actual www data such as: + +```shell +/cake/app/webroot +``` + +instead of +```shell +/htdocs +``` + +You can easily achieve this by symlinking this folder to `htdocs`: + +```shell +$ ls -l / +drwxrwxr-x 2 cytopia 4096 Jun 14 08:29 cakephp +lrwxrwxrwx 1 cytopia 11 Jun 14 08:29 htdocs -> cakephp/app/webroot/ +``` + +See [Examples](Examples.md) for more info about how to setup different frameworks. + + +## 6. Enter the PHP Docker container + +The PHP Docker container is your workhorse which has many tools pre-installed and you can do every task inside instead of doing it on the docker host. Entering the container is done via a shipped script: + +```shell +host> ./bash.sh +devilbox@php-7.0.19 in /shared/httpd $ +``` + +See [Usage](Usage.md) for a detailed explanation. diff --git a/docs/README.md b/docs/README.md index daf94203..85d17ec2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -170,3 +170,5 @@ As far as tested there are no limitations and you can use any Framework or CMS j ![Phalcon](img/logos/phalcon.png) ![Wordpress](img/logos/wordpress.png) ![Yii](img/logos/yii.png) + +Have a look at [Examples](Examples.md) for how to set them up. diff --git a/docs/Technical.md b/docs/Technical.md index 74453afb..f8428a4f 100644 --- a/docs/Technical.md +++ b/docs/Technical.md @@ -87,7 +87,7 @@ The following container can be reached from the Docker host via the following me | Container | IP Address | Port | |-----------------|------------|-------| -| DNS | 127.0.0.1 | 53 | +| DNS | 127.0.0.1 | 1053 | | PHP / HHVM | - | 9000 | | Apache / Nginx | 127.0.0.1 | 80 | | MySQL / MariaDB | 127.0.0.1 | 3306 | diff --git a/docs/Usage.md b/docs/Usage.md index f850605f..ad362214 100644 --- a/docs/Usage.md +++ b/docs/Usage.md @@ -17,6 +17,10 @@ Usage | ## Usage +1. [Mounted directories](#1-mounted-directories) + +Mounted directories are the bridge between the container and your host computer. + 1. [Work on the Docker host](#1-work-on-the-docker-host) 2. [Work inside the PHP container](#2-work-inside-the-php-container) 1. [As devilbox user](#2-1-as-devilbox-user) @@ -40,6 +44,8 @@ Usage | 3. [NoSQL versions](#5-4-nosql-versions) 6. [Emails](#6-emails) 7. [Log files](#7-log-files) + 1. [Mounted logs](#7-1-mounted-logs) + 2. [Docker logs](#7-2-docker-logs) 8. [Intranet](#8-intranet) 1. [Overview](#8-1-overview) 2. [vHosts](#8-2-vhosts) @@ -254,6 +260,8 @@ Being able to combine all kinds of different container version is one of the mai Be aware that if multiple lines are uncommented, the last one takes effect. +For an in-depth explanation about how to configure each service, you should have a look at [Configure](Configure.md). + #### 5.1 Httpd versions 1. Open the `.env` file in your favorite editor @@ -293,7 +301,45 @@ In order to view sent emails open up the devilbox intranet http://localhost/mail ## 7. Log files -Log files are available on the Host system and separated per service version. See `./log/` (inside devilbox git directory) for all log files. +#### 7.1 Mounted logs + +Log files are available on the Host system and separated per service version. See `./log/` (inside devilbox git directory). The `./log/` folder itself will contain subdirectories in the form `-` which will then hold all available log files. + +**Example:** + +``` +log/ + apache-2.2/ + access_log + error_log + localhost-access.log + localhost-error.log + other-error.log + apache-2.4/ + access_log + error_log + localhost-access.log + localhost-error.log + other-error.log + mariadb-10.3/ + error.log + query.log + slow.log + php-fpm-7.0/ + php-fpm.err + www-access.log + www-error.log +``` + +#### 7.2 Docker logs + +All output printed to stdout or stderr by the started services will be available in `docker logs`. In order to view them constantly in a terminal session use: + +```shell +docker-compose logs -f +``` + +Docker logs are currently only being used to display the initial startup including the chosen settings. All other logging is written to file and mounted to the docker host. ## 8. Intranet