mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-19 04:47:52 +00:00
Check documentation via travis
This commit is contained in:
parent
5cf7a45638
commit
8f71c56a51
30
.travis.yml
30
.travis.yml
@ -1,3 +1,8 @@
|
|||||||
|
###
|
||||||
|
### Enable Python support
|
||||||
|
###
|
||||||
|
language: python
|
||||||
|
|
||||||
###
|
###
|
||||||
### Enable sudo (required for docker service)
|
### Enable sudo (required for docker service)
|
||||||
###
|
###
|
||||||
@ -15,6 +20,11 @@ services:
|
|||||||
### Specify combinations
|
### Specify combinations
|
||||||
###
|
###
|
||||||
env:
|
env:
|
||||||
|
###
|
||||||
|
### Check Documentation
|
||||||
|
###
|
||||||
|
- S1=DOCUMENTATION
|
||||||
|
|
||||||
###
|
###
|
||||||
### The matrix specifies 2 versions to compare against each other.
|
### The matrix specifies 2 versions to compare against each other.
|
||||||
### As PHP (any version) needs to be able to run with everything,
|
### As PHP (any version) needs to be able to run with everything,
|
||||||
@ -111,6 +121,19 @@ before_install:
|
|||||||
- docker-compose version
|
- docker-compose version
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Installation
|
||||||
|
###
|
||||||
|
install:
|
||||||
|
# Install dependencies for documentation
|
||||||
|
- if [ "${S1}" = "DOCUMENTATION" ]; then
|
||||||
|
pip install sphinx;
|
||||||
|
pip install sphinx-autobuild;
|
||||||
|
pip install recommonmark;
|
||||||
|
pip install sphinx_rtd_theme;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Before Script
|
### Before Script
|
||||||
###
|
###
|
||||||
@ -135,4 +158,9 @@ before_script:
|
|||||||
### Test
|
### Test
|
||||||
###
|
###
|
||||||
script:
|
script:
|
||||||
- .tests/test_single.sh . "${S1}" "${V1}" "${S2}" "${V2}"
|
- if [ "${S1}" = "DOCUMENTATION" ]; then
|
||||||
|
cd docs/;
|
||||||
|
sphinx-build -a -W -E -j auto -n -v . _build/html/;
|
||||||
|
else
|
||||||
|
.tests/test_single.sh . "${S1}" "${V1}" "${S2}" "${V2}";
|
||||||
|
fi
|
||||||
|
@ -17,13 +17,13 @@ Shell commands
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> command
|
host> command
|
||||||
|
|
||||||
2. This one indicates that the command should be executed inside the currently selected PHP container. (When copying commands, do not copy the ``php>`` part).
|
2. This one indicates that the command should be executed inside the currently selected PHP container. (When copying commands, do not copy the ``php>`` part).
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
php> command
|
php> command
|
||||||
|
|
||||||
|
|
||||||
Checklists
|
Checklists
|
||||||
|
@ -11,9 +11,9 @@ custom configurations.
|
|||||||
.. seealso:: If you are rather using Nginx, have a look at: :ref:`nginx_conf`
|
.. seealso:: If you are rather using Nginx, have a look at: :ref:`nginx_conf`
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
You could actually also create virtual hosts here, but it is recommended to use the
|
You could actually also create virtual hosts here, but it is recommended to use the
|
||||||
Devilbox Auto-vhost generation feature. If you want to custimize your current virtual hosts
|
Devilbox Auto-vhost generation feature. If you want to custimize your current virtual hosts
|
||||||
have a look at :ref:`custom_vhost`.
|
have a look at :ref:`custom_vhost`.
|
||||||
|
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
@ -29,10 +29,10 @@ See the directory structure for Apache configuration directories inside ``./cfg/
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ls -l path/to/devilbox/cfg/ | grep 'apache'
|
host> ls -l path/to/devilbox/cfg/ | grep 'apache'
|
||||||
|
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 apache-2.2/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 apache-2.2/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 apache-2.4/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 apache-2.4/
|
||||||
|
|
||||||
Customization is achieved by placing a file into ``cfg/apache-X.X/`` (where ``X.X`` stands for
|
Customization is achieved by placing a file into ``cfg/apache-X.X/`` (where ``X.X`` stands for
|
||||||
your Apache version). The file must end by ``.conf`` in order to be sourced by the web server.
|
your Apache version). The file must end by ``.conf`` in order to be sourced by the web server.
|
||||||
@ -59,31 +59,30 @@ Apache 2.2.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to Apache 2.2 config directory
|
# Navigate to Apache 2.2 config directory
|
||||||
host> cd cfg/apache-2.2
|
host> cd cfg/apache-2.2
|
||||||
|
|
||||||
# Create new conf file
|
# Create new conf file
|
||||||
host> touch keep_alive.conf
|
host> touch keep_alive.conf
|
||||||
|
|
||||||
Now add the following content to the file:
|
Now add the following content to the file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
:name: keep_alive.conf
|
:caption: keep_alive.conf
|
||||||
:caption: keep_alive.conf
|
|
||||||
|
|
||||||
KeepAlive On
|
KeepAlive On
|
||||||
KeepAliveTimeout 10
|
KeepAliveTimeout 10
|
||||||
MaxKeepAliveRequests 100
|
MaxKeepAliveRequests 100
|
||||||
|
|
||||||
In order to apply the changes you need to restart the Devilbox.
|
In order to apply the changes you need to restart the Devilbox.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The above is just an example demonstration, you probably need other values for your setup.
|
The above is just an example demonstration, you probably need other values for your setup.
|
||||||
So make sure to understand how to configure Apache, if you are going to change any of those
|
So make sure to understand how to configure Apache, if you are going to change any of those
|
||||||
settings.
|
settings.
|
||||||
|
|
||||||
|
|
||||||
Limit HTTP headers and GET size for Apache 2.4
|
Limit HTTP headers and GET size for Apache 2.4
|
||||||
@ -99,31 +98,30 @@ for Apache 2.4.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to Apache 2.4 config directory
|
# Navigate to Apache 2.4 config directory
|
||||||
host> cd cfg/apache-2.4
|
host> cd cfg/apache-2.4
|
||||||
|
|
||||||
# Create new conf file
|
# Create new conf file
|
||||||
host> touch limits.conf
|
host> touch limits.conf
|
||||||
|
|
||||||
Now add the following content to the file:
|
Now add the following content to the file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
:name: limits.conf
|
:caption: limits.conf
|
||||||
:caption: limits.conf
|
|
||||||
|
|
||||||
# Limit amount of HTTP headers a client can send to the server
|
# Limit amount of HTTP headers a client can send to the server
|
||||||
LimitRequestFields 20
|
LimitRequestFields 20
|
||||||
LimitRequestFieldSize 4094
|
LimitRequestFieldSize 4094
|
||||||
|
|
||||||
# URL GET size
|
# URL GET size
|
||||||
LimitRequestLine 2048
|
LimitRequestLine 2048
|
||||||
|
|
||||||
In order to apply the changes you need to restart the Devilbox.
|
In order to apply the changes you need to restart the Devilbox.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The above is just an example demonstration, you probably need other values for your setup.
|
The above is just an example demonstration, you probably need other values for your setup.
|
||||||
So make sure to understand how to configure Apache, if you are going to change any of those
|
So make sure to understand how to configure Apache, if you are going to change any of those
|
||||||
settings.
|
settings.
|
||||||
|
@ -43,22 +43,21 @@ by ``.sh`` and place it into the ``./bash/`` directory:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox git directory
|
# Navigate to the Devilbox git directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Create a new file
|
# Create a new file
|
||||||
host> touch ./bash/aliases.sh
|
host> touch ./bash/aliases.sh
|
||||||
|
|
||||||
# Add some content to the file
|
# Add some content to the file
|
||||||
host> vi ./bash/aliases.sh
|
host> vi ./bash/aliases.sh
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: ./bash/aliases.sh
|
:caption: ./bash/aliases.sh
|
||||||
:caption: ./bash/aliases.sh
|
|
||||||
|
|
||||||
alias l='ls -a'
|
alias l='ls -a'
|
||||||
alias ll='ls -al'
|
alias ll='ls -al'
|
||||||
alias www='cd /shared/httpd'
|
alias www='cd /shared/httpd'
|
||||||
|
|
||||||
|
|
||||||
Custom vim configuration
|
Custom vim configuration
|
||||||
@ -72,11 +71,11 @@ First of all, place your favorite ``.vimrc`` into the ``./bash/`` directory
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox git directory
|
# Navigate to the Devilbox git directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Copy your vim config to the ./bash directory
|
# Copy your vim config to the ./bash directory
|
||||||
host> cp ~/.vimrc bash/.vimrc
|
host> cp ~/.vimrc bash/.vimrc
|
||||||
|
|
||||||
Right now, this is not going to do anything and as ``.vimrc`` is not ending by ``.sh`` it is also
|
Right now, this is not going to do anything and as ``.vimrc`` is not ending by ``.sh`` it is also
|
||||||
ignored by the shell itself. What is now left to do, is make vim itself always use this config file.
|
ignored by the shell itself. What is now left to do, is make vim itself always use this config file.
|
||||||
@ -87,14 +86,14 @@ that will always use this file:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox git directory
|
# Navigate to the Devilbox git directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Create a new file
|
# Create a new file
|
||||||
host> touch ./bash/vim.sh
|
host> touch ./bash/vim.sh
|
||||||
|
|
||||||
# Add your vim alias
|
# Add your vim alias
|
||||||
host> vi ./bash/vim.sh
|
host> vi ./bash/vim.sh
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: ./bash/vim.sh
|
:caption: ./bash/vim.sh
|
||||||
|
@ -25,8 +25,8 @@ Copy example file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> cp docker-compose.override.yml-example docker-compose.override.yml
|
host> cp docker-compose.override.yml-example docker-compose.override.yml
|
||||||
|
|
||||||
|
|
||||||
Create new file from scratch
|
Create new file from scratch
|
||||||
@ -38,30 +38,27 @@ Create new file from scratch
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Create an empty file
|
# Create an empty file
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> touch docker-compose.override.yml
|
host> touch docker-compose.override.yml
|
||||||
|
|
||||||
# Retrieve the current version
|
# Retrieve the current version
|
||||||
host> grep ^version docker-compose.yml
|
host> grep ^version docker-compose.yml
|
||||||
version: '2.1'
|
version: '2.1'
|
||||||
|
|
||||||
# Add this version line to docker-compose.override.yml
|
# Add this version line to docker-compose.override.yml
|
||||||
host> echo "version: '2.1'" > docker-compose.override.yml
|
host> echo "version: '2.1'" > docker-compose.override.yml
|
||||||
|
|
||||||
Let's see again how this file should look like now:
|
Let's see again how this file should look like now:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:name: docker-compose.override.yml
|
:caption: docker-compose.override.yml
|
||||||
:caption: docker-compose.override.yml
|
|
||||||
|
|
||||||
version: '2.1'
|
|
||||||
|
|
||||||
|
|
||||||
|
version: '2.1'
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The documentation might be outdated and the version number might already be higher.
|
The documentation might be outdated and the version number might already be higher.
|
||||||
Rely on the output of the ``grep`` command.
|
Rely on the output of the ``grep`` command.
|
||||||
|
|
||||||
|
|
||||||
Further reading
|
Further reading
|
||||||
@ -71,5 +68,5 @@ To dive deeper into this topic and see how to actually add new services or overw
|
|||||||
services follow the below listed links:
|
services follow the below listed links:
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
* :ref:`add_your_own_docker_image`
|
* :ref:`add_your_own_docker_image`
|
||||||
* :ref:`overwrite_existing_docker_image`
|
* :ref:`overwrite_existing_docker_image`
|
||||||
|
@ -10,4 +10,4 @@ It is very tempting to just change this file in order to add new services to the
|
|||||||
However your git directory will become dirty and you will always have to stash your changes before pulling new features from remote. To overcome this Docker Compose offers a default override file (``docker-compose.override.yml``) that let's you specify custom changes as well as completely new services without having to touch the default ``docker-compose.yml``.
|
However your git directory will become dirty and you will always have to stash your changes before pulling new features from remote. To overcome this Docker Compose offers a default override file (``docker-compose.override.yml``) that let's you specify custom changes as well as completely new services without having to touch the default ``docker-compose.yml``.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
To find out more read :ref:`docker_compose_override_yml`
|
To find out more read :ref:`docker_compose_override_yml`
|
||||||
|
@ -62,61 +62,61 @@ The ``./log/`` directory itself will contain subdirectories in the form ``<servi
|
|||||||
which will then hold all available log files.
|
which will then hold all available log files.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Log directories do not exist until you start the Devilbox and will only be created for
|
Log directories do not exist until you start the Devilbox and will only be created for
|
||||||
the service versions you have enabled in ``.env``.
|
the service versions you have enabled in ``.env``.
|
||||||
|
|
||||||
The log directory structure would look something like this:
|
The log directory structure would look something like this:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> tree log
|
host> tree log
|
||||||
|
|
||||||
log/
|
log/
|
||||||
├── nginx-stable/
|
├── nginx-stable/
|
||||||
│ ├── nginx-stable/
|
│ ├── nginx-stable/
|
||||||
│ ├── defaultlocalhost-access.log
|
│ ├── defaultlocalhost-access.log
|
||||||
│ ├── defaultlocalhost-error.log
|
│ ├── defaultlocalhost-error.log
|
||||||
│ ├── <project-name>-access.log # Each project has its own access log
|
│ ├── <project-name>-access.log # Each project has its own access log
|
||||||
│ ├── <project-name>-error.log # Each project has its own error log
|
│ ├── <project-name>-error.log # Each project has its own error log
|
||||||
├── mariadb-10.1/
|
├── mariadb-10.1/
|
||||||
│ ├── error.log
|
│ ├── error.log
|
||||||
│ ├── query.log
|
│ ├── query.log
|
||||||
│ ├── slow.log
|
│ ├── slow.log
|
||||||
├── php-fpm-7.1/
|
├── php-fpm-7.1/
|
||||||
│ ├── php-fpm.access
|
│ ├── php-fpm.access
|
||||||
│ ├── php-fpm.error
|
│ ├── php-fpm.error
|
||||||
|
|
||||||
When you want to read logs sent to Docker logs, you can do so via the following command:
|
When you want to read logs sent to Docker logs, you can do so via the following command:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> docker-compose logs
|
host> docker-compose logs
|
||||||
|
|
||||||
When you want to continuously watch the log output (such as ``tail -f``), you need to append ``-f``
|
When you want to continuously watch the log output (such as ``tail -f``), you need to append ``-f``
|
||||||
to the command.
|
to the command.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> docker-compose logs -f
|
host> docker-compose logs -f
|
||||||
|
|
||||||
When you only want to have logs displayed for a single service, you can also append the service
|
When you only want to have logs displayed for a single service, you can also append the service
|
||||||
name (works with or without ``-f`` as well):
|
name (works with or without ``-f`` as well):
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> docker-compose logs php -f
|
host> docker-compose logs php -f
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
Currently this is only implemented for PHP-FPM and HTTPD Docker container.
|
Currently this is only implemented for PHP-FPM and HTTPD Docker container.
|
||||||
MySQL will always output its logs to file and all other official Docker container
|
MySQL will always output its logs to file and all other official Docker container
|
||||||
always output to Docker logs.
|
always output to Docker logs.
|
||||||
|
|
||||||
|
|
||||||
DEVILBOX_PATH
|
DEVILBOX_PATH
|
||||||
@ -226,24 +226,23 @@ this project visible to everyone in your corporate LAN.
|
|||||||
+-------------+----------------+---------------------------+
|
+-------------+----------------+---------------------------+
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Do not use ``dev`` as a domain suffix (I know, it's tempting).
|
Do not use ``dev`` as a domain suffix (I know, it's tempting).
|
||||||
It has been registered by
|
It has been registered by
|
||||||
`Google <https://icannwiki.org/.dev>`_ and they advertise the
|
`Google <https://icannwiki.org/.dev>`_ and they advertise the
|
||||||
`HSTS header <https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security>`_
|
`HSTS header <https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security>`_
|
||||||
which makes your browser redirect every http request to https.
|
which makes your browser redirect every http request to https.
|
||||||
|
|
||||||
**See also:** `This blog post <https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts>`_
|
**See also:** `This blog post <https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts>`_
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Do not use ``localhost`` as a domain suffix.
|
Do not use ``localhost`` as a domain suffix.
|
||||||
There is an RFC draft to make sure all localhost requests, including their sub domains
|
There is an RFC draft to make sure all localhost requests, including their sub domains
|
||||||
should be redirected to the systems loopback interface.
|
should be redirected to the systems loopback interface.
|
||||||
Docker has already released a commit preventing the use of ``localhost`` on MacOS.
|
Docker has already released a commit preventing the use of ``localhost`` on MacOS.
|
||||||
|
|
||||||
|
**See also:** `RFC Draft <https://tools.ietf.org/html/draft-west-let-localhost-be-localhost-06>`_
|
||||||
**See also:** `RFC Draft <https://tools.ietf.org/html/draft-west-let-localhost-be-localhost-06>`_
|
and
|
||||||
and
|
`Docker Release notes <https://docs.docker.com/docker-for-mac/release-notes/#docker-community-edition-17120-ce-mac46-2018-01-09>`_
|
||||||
`Docker Release notes <https://docs.docker.com/docker-for-mac/release-notes/#docker-community-edition-17120-ce-mac46-2018-01-09>`_
|
|
||||||
|
|
||||||
.. _env_extra_hosts:
|
.. _env_extra_hosts:
|
||||||
|
|
||||||
@ -269,13 +268,13 @@ The general structure to add extra hosts looks like this
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Single host
|
# Single host
|
||||||
EXTRA_HOSTS='hostname=1.1.1.1'
|
EXTRA_HOSTS='hostname=1.1.1.1'
|
||||||
EXTRA_HOSTS='hostname=CNAME'
|
EXTRA_HOSTS='hostname=CNAME'
|
||||||
|
|
||||||
# Multiple hosts
|
# Multiple hosts
|
||||||
EXTRA_HOSTS='hostname1=1.1.1.1,hostname2=2.2.2.2'
|
EXTRA_HOSTS='hostname1=1.1.1.1,hostname2=2.2.2.2'
|
||||||
EXTRA_HOSTS='hostname1=CNAME1,hostname2=CNAME2'
|
EXTRA_HOSTS='hostname1=CNAME1,hostname2=CNAME2'
|
||||||
|
|
||||||
* The left side represents the name by which the host will be available by
|
* The left side represents the name by which the host will be available by
|
||||||
* The right side represents the IP address by which the new name will resolve to
|
* The right side represents the IP address by which the new name will resolve to
|
||||||
@ -285,32 +284,32 @@ A few examples for adding extra hosts:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# 1. One entry:
|
# 1. One entry:
|
||||||
# The following extra host 'loc' is added and will always point to 192.168.0.7.
|
# The following extra host 'loc' is added and will always point to 192.168.0.7.
|
||||||
# When reverse resolving '192.168.0.7' it will answer with 'tld'.
|
# When reverse resolving '192.168.0.7' it will answer with 'tld'.
|
||||||
EXTRA_HOSTS='loc=192.168.0.7'
|
EXTRA_HOSTS='loc=192.168.0.7'
|
||||||
|
|
||||||
# 2. One entry:
|
# 2. One entry:
|
||||||
# The following extra host 'my.host.loc' is added and will always point to 192.168.0.9.
|
# The following extra host 'my.host.loc' is added and will always point to 192.168.0.9.
|
||||||
# When reverse resolving '192.168.0.9' it will answer with 'my.host'.
|
# When reverse resolving '192.168.0.9' it will answer with 'my.host'.
|
||||||
EXTRA_HOSTS='my.host.loc=192.168.0.9'
|
EXTRA_HOSTS='my.host.loc=192.168.0.9'
|
||||||
|
|
||||||
# 3. Two entries:
|
# 3. Two entries:
|
||||||
# The following extra host 'tld' is added and will always point to 192.168.0.1.
|
# The following extra host 'tld' is added and will always point to 192.168.0.1.
|
||||||
# When reverse resolving '192.168.0.1' it will answer with 'tld'.
|
# When reverse resolving '192.168.0.1' it will answer with 'tld'.
|
||||||
# A second extra host 'example.org' is added and always redirects to 192.168.0.2
|
# A second extra host 'example.org' is added and always redirects to 192.168.0.2
|
||||||
# When reverse resolving '192.168.0.2' it will answer with 'example.org'.
|
# When reverse resolving '192.168.0.2' it will answer with 'example.org'.
|
||||||
EXTRA_HOSTS='tld=192.168.0.1,example.org=192.168.0.2'
|
EXTRA_HOSTS='tld=192.168.0.1,example.org=192.168.0.2'
|
||||||
|
|
||||||
# 4. Using CNAME's for resolving:
|
# 4. Using CNAME's for resolving:
|
||||||
# The following extra host 'my.host' is added and will always point to whatever
|
# The following extra host 'my.host' is added and will always point to whatever
|
||||||
# IP example.org resolves to.
|
# IP example.org resolves to.
|
||||||
# When reverse resolving '192.168.0.1' it will answer with 'my.host'.
|
# When reverse resolving '192.168.0.1' it will answer with 'my.host'.
|
||||||
EXTRA_HOSTS='my.host=example.org'
|
EXTRA_HOSTS='my.host=example.org'
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
|
|
||||||
This resembles the feature of `Docker Compose: extra_hosts <https://docs.docker.com/compose/compose-file/#external_links>`_ to add external links.
|
This resembles the feature of `Docker Compose: extra_hosts <https://docs.docker.com/compose/compose-file/#external_links>`_ to add external links.
|
||||||
|
|
||||||
.. seealso:: :ref:`communicating_with_external_hosts`
|
.. seealso:: :ref:`communicating_with_external_hosts`
|
||||||
|
|
||||||
@ -329,8 +328,8 @@ How do you find out your user id?
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> id -u
|
host> id -u
|
||||||
1000
|
1000
|
||||||
|
|
||||||
In most cases (on Linux and MacOS), this will be ``1000`` if you are the first and only user on
|
In most cases (on Linux and MacOS), this will be ``1000`` if you are the first and only user on
|
||||||
your system, however it could also be a different value.
|
your system, however it could also be a different value.
|
||||||
@ -363,8 +362,8 @@ How do you find out your group id?
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> id -g
|
host> id -g
|
||||||
1000
|
1000
|
||||||
|
|
||||||
In most cases (on Linux and MacOS), this will be ``1000`` if you are the first and only user on
|
In most cases (on Linux and MacOS), this will be ``1000`` if you are the first and only user on
|
||||||
your system, however it could also be a different value.
|
your system, however it could also be a different value.
|
||||||
@ -534,7 +533,6 @@ All values are already available in the ``.env`` file and just need to be commen
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 7
|
:emphasize-lines: 7
|
||||||
|
|
||||||
host> grep PHP_SERVER .env
|
host> grep PHP_SERVER .env
|
||||||
@ -566,7 +564,6 @@ All values are already available in the ``.env`` file and just need to be commen
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 5
|
:emphasize-lines: 5
|
||||||
|
|
||||||
host> grep HTTPD_SERVER .env
|
host> grep HTTPD_SERVER .env
|
||||||
@ -594,7 +591,6 @@ All values are already available in the ``.env`` file and just need to be commen
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 9
|
:emphasize-lines: 9
|
||||||
|
|
||||||
host> grep MYSQL_SERVER .env
|
host> grep MYSQL_SERVER .env
|
||||||
@ -630,7 +626,6 @@ All values are already available in the ``.env`` file and just need to be commen
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 8
|
:emphasize-lines: 8
|
||||||
|
|
||||||
host> grep PGSQL_SERVER .env
|
host> grep PGSQL_SERVER .env
|
||||||
@ -666,7 +661,6 @@ All values are already available in the ``.env`` file and just need to be commen
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 6
|
:emphasize-lines: 6
|
||||||
|
|
||||||
host> grep REDIS_SERVER .env
|
host> grep REDIS_SERVER .env
|
||||||
@ -699,7 +693,6 @@ All values are already available in the ``.env`` file and just need to be commen
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 24
|
:emphasize-lines: 24
|
||||||
|
|
||||||
host> grep MEMCD_SERVER .env
|
host> grep MEMCD_SERVER .env
|
||||||
@ -751,7 +744,6 @@ All values are already available in the ``.env`` file and just need to be commen
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 6
|
:emphasize-lines: 6
|
||||||
|
|
||||||
host> grep MONGO_SERVER .env
|
host> grep MONGO_SERVER .env
|
||||||
@ -814,9 +806,8 @@ like this:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
|
|
||||||
HOST_PATH_HTTPD_DATADIR=/home/myuser/workspace/web
|
HOST_PATH_HTTPD_DATADIR=/home/myuser/workspace/web
|
||||||
|
|
||||||
Mapping
|
Mapping
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
@ -862,18 +853,18 @@ The directory structure will look something like this:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ls -l ./data/mysql/
|
host> ls -l ./data/mysql/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.0/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.0/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.1/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.1/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.2/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.2/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.3/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mariadb-10.3/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-5.5/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-5.5/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-5.6/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-5.6/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-5.7/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-5.7/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-8.0/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 mysql-8.0/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 percona-5.5/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 percona-5.5/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 percona-5.6/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 percona-5.6/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 percona-5.7/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 percona-5.7/
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
:ref:`remove_stopped_container`
|
:ref:`remove_stopped_container`
|
||||||
@ -908,13 +899,13 @@ The directory structure will look something like this:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ls -l ./data/pgsql/
|
host> ls -l ./data/pgsql/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.1/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.1/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.2/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.2/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.3/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.3/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.4/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.4/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.5/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.5/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.6/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 9.6/
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
:ref:`remove_stopped_container`
|
:ref:`remove_stopped_container`
|
||||||
@ -949,12 +940,12 @@ The directory structure will look something like this:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ls -l ./data/mongo/
|
host> ls -l ./data/mongo/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 2.8/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 2.8/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.0/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.0/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.2/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.2/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.4/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.4/
|
||||||
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.5/
|
drwxrwxr-x 6 48 48 4096 Jun 21 08:47 3.5/
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
:ref:`remove_stopped_container`
|
:ref:`remove_stopped_container`
|
||||||
@ -976,13 +967,13 @@ Open a terminal and type the following:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> netstat -an | grep 'LISTEN\s'
|
host> netstat -an | grep 'LISTEN\s'
|
||||||
tcp 0 0 127.0.0.1:53585 0.0.0.0:* LISTEN
|
tcp 0 0 127.0.0.1:53585 0.0.0.0:* LISTEN
|
||||||
tcp 0 0 127.0.0.1:37715 0.0.0.0:* LISTEN
|
tcp 0 0 127.0.0.1:37715 0.0.0.0:* LISTEN
|
||||||
tcp 0 0 127.0.0.1:58555 0.0.0.0:* LISTEN
|
tcp 0 0 127.0.0.1:58555 0.0.0.0:* LISTEN
|
||||||
tcp 0 0 127.0.0.1:48573 0.0.0.0:* LISTEN
|
tcp 0 0 127.0.0.1:48573 0.0.0.0:* LISTEN
|
||||||
tcp 0 0 127.0.0.1:34591 0.0.0.0:* LISTEN
|
tcp 0 0 127.0.0.1:34591 0.0.0.0:* LISTEN
|
||||||
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN
|
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN
|
||||||
|
|
||||||
**How to list used ports on Windows**
|
**How to list used ports on Windows**
|
||||||
|
|
||||||
@ -990,12 +981,12 @@ Open the command prompt and type the following:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
C:\WINDOWS\system32> netstat -an
|
C:\WINDOWS\system32> netstat -an
|
||||||
Proto Local Address Foreign Address State
|
Proto Local Address Foreign Address State
|
||||||
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
|
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
|
||||||
TCP 0.0.0.0:145 0.0.0.0:0 LISTENING
|
TCP 0.0.0.0:145 0.0.0.0:0 LISTENING
|
||||||
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
|
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
|
||||||
TCP 0.0.0.0:1875 0.0.0.0:0 LISTENING
|
TCP 0.0.0.0:1875 0.0.0.0:0 LISTENING
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
:ref:`docker_toolbox`
|
:ref:`docker_toolbox`
|
||||||
@ -1139,13 +1130,12 @@ Enable any non-standard PHP modules in a comma separated list.
|
|||||||
+------------------------+--------------------------------------+------------------+
|
+------------------------+--------------------------------------+------------------+
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Currently only ``ioncube`` is available to enable.
|
Currently only ``ioncube`` is available to enable.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
# Enable ionCube
|
# Enable ionCube
|
||||||
@ -1166,7 +1156,6 @@ Example:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
# Disable Xdebug, Imagick and Swoole
|
# Disable Xdebug, Imagick and Swoole
|
||||||
@ -1184,7 +1173,6 @@ production, for example: ``APPLICATION_ENV``, you can just add this to the ``.en
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 3
|
:emphasize-lines: 3
|
||||||
|
|
||||||
host> grep APPLICATION_ENV .env
|
host> grep APPLICATION_ENV .env
|
||||||
@ -1195,7 +1183,6 @@ Within your php application/file you can then access this variable via the ``get
|
|||||||
|
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
:caption: index.php
|
:caption: index.php
|
||||||
:name: index.php
|
|
||||||
:emphasize-lines: 3
|
:emphasize-lines: 3
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -1257,15 +1244,15 @@ Let's have a look how the directory is actually built up:
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 4
|
:emphasize-lines: 4
|
||||||
|
|
||||||
# Project directory
|
# Project directory
|
||||||
host> ls -l data/www/my-first-project/
|
host> ls -l data/www/my-first-project/
|
||||||
total 4
|
total 4
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 htdocs/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 htdocs/
|
||||||
|
|
||||||
# htdocs directory inside your project directory
|
# htdocs directory inside your project directory
|
||||||
host> ls -l data/www/my-first-project/htdocs
|
host> ls -l data/www/my-first-project/htdocs
|
||||||
total 4
|
total 4
|
||||||
-rw-r--r-- 1 cytopia cytopia 87 Mar 12 23:05 index.php
|
-rw-r--r-- 1 cytopia cytopia 87 Mar 12 23:05 index.php
|
||||||
|
|
||||||
By calling your proect url, the ``index.php`` file will be served.
|
By calling your proect url, the ``index.php`` file will be served.
|
||||||
|
|
||||||
@ -1280,16 +1267,16 @@ Let's have a look how the directory is actually built up:
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 5
|
:emphasize-lines: 5
|
||||||
|
|
||||||
# Project directory
|
# Project directory
|
||||||
host> ls -l data/www/my-first-project/
|
host> ls -l data/www/my-first-project/
|
||||||
total 4
|
total 4
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 cakephp/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 cakephp/
|
||||||
lrwxrwxrwx 1 cytopia cytopia 15 Mar 17 09:36 htdocs -> cakephp/webroot/
|
lrwxrwxrwx 1 cytopia cytopia 15 Mar 17 09:36 htdocs -> cakephp/webroot/
|
||||||
|
|
||||||
# htdocs directory inside your project directory
|
# htdocs directory inside your project directory
|
||||||
host> ls -l data/www/my-first-project/htdocs
|
host> ls -l data/www/my-first-project/htdocs
|
||||||
total 4
|
total 4
|
||||||
-rw-r--r-- 1 cytopia cytopia 87 Mar 12 23:05 index.php
|
-rw-r--r-- 1 cytopia cytopia 87 Mar 12 23:05 index.php
|
||||||
|
|
||||||
As you can see, the web server is still able to server the files from the ``htdocs`` location,
|
As you can see, the web server is still able to server the files from the ``htdocs`` location,
|
||||||
this time however, ``htdocs`` itself is a symlink pointing to a much deeper and nested location
|
this time however, ``htdocs`` itself is a symlink pointing to a much deeper and nested location
|
||||||
@ -1320,10 +1307,10 @@ Let's have a look at an imaginary project directory called ``my-first-project``:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Project directory
|
# Project directory
|
||||||
host> ls -l data/www/my-first-project/
|
host> ls -l data/www/my-first-project/
|
||||||
total 4
|
total 4
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 htdocs/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 htdocs/
|
||||||
|
|
||||||
Inside this your project directory you will need to create another directory which is called
|
Inside this your project directory you will need to create another directory which is called
|
||||||
``.devilbox`` by default. If you change the ``HTTPD_TEMPLATE_DIR`` variable to something else,
|
``.devilbox`` by default. If you change the ``HTTPD_TEMPLATE_DIR`` variable to something else,
|
||||||
@ -1332,13 +1319,13 @@ you will have to create a directory by whatever name you chose for that variable
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 3,6
|
:emphasize-lines: 3,6
|
||||||
|
|
||||||
# Project directory
|
# Project directory
|
||||||
host> cd data/www/my-first-project/
|
host> cd data/www/my-first-project/
|
||||||
host> mkdir .devilbox
|
host> mkdir .devilbox
|
||||||
host> ls -l
|
host> ls -l
|
||||||
total 4
|
total 4
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 .devilbox/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 .devilbox/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 htdocs/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 htdocs/
|
||||||
|
|
||||||
Now you need to copy the ``vhost-gen`` templates into the ``.devilbox`` directory. The templates
|
Now you need to copy the ``vhost-gen`` templates into the ``.devilbox`` directory. The templates
|
||||||
are available in the Devilbox git directory under ``templates/vhost-gen/``.
|
are available in the Devilbox git directory under ``templates/vhost-gen/``.
|
||||||
@ -1350,11 +1337,11 @@ present.
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 5
|
:emphasize-lines: 5
|
||||||
|
|
||||||
# Navigate into the devilbox directory
|
# Navigate into the devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Copy templates to your project directory
|
# Copy templates to your project directory
|
||||||
host> cp templates/vhost-gen/* data/www/my-first-project/.devilbox/
|
host> cp templates/vhost-gen/* data/www/my-first-project/.devilbox/
|
||||||
|
|
||||||
|
|
||||||
Let's have a look how the directory is actually built up:
|
Let's have a look how the directory is actually built up:
|
||||||
@ -1362,35 +1349,35 @@ Let's have a look how the directory is actually built up:
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 4,8
|
:emphasize-lines: 4,8
|
||||||
|
|
||||||
# Project directory
|
# Project directory
|
||||||
host> ls -l data/www/my-first-project/
|
host> ls -l data/www/my-first-project/
|
||||||
total 4
|
total 4
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 .devilbox/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 .devilbox/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 htdocs/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 12 23:05 htdocs/
|
||||||
|
|
||||||
# template directory inside your project directory
|
# template directory inside your project directory
|
||||||
host> ls -l data/www/my-first-project/htdocs/.devilbox
|
host> ls -l data/www/my-first-project/htdocs/.devilbox
|
||||||
total 4
|
total 4
|
||||||
-rw-r--r-- 1 cytopia cytopia 87 Mar 12 23:05 apache22.yml
|
-rw-r--r-- 1 cytopia cytopia 87 Mar 12 23:05 apache22.yml
|
||||||
-rw-r--r-- 1 cytopia cytopia 87 Mar 12 23:05 apache24.yml
|
-rw-r--r-- 1 cytopia cytopia 87 Mar 12 23:05 apache24.yml
|
||||||
-rw-r--r-- 1 cytopia cytopia 87 Mar 12 23:05 nginx.yml
|
-rw-r--r-- 1 cytopia cytopia 87 Mar 12 23:05 nginx.yml
|
||||||
|
|
||||||
The three files ``apache22.yml``, ``apache24.yml`` and ``nginx.yml`` let you customize your web
|
The three files ``apache22.yml``, ``apache24.yml`` and ``nginx.yml`` let you customize your web
|
||||||
servers virtual host to anything from adding rewrite rules, overwriting directory index to even
|
servers virtual host to anything from adding rewrite rules, overwriting directory index to even
|
||||||
changing the server name or adding locations to other assets.
|
changing the server name or adding locations to other assets.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
The whole process is based on a project called `vhost-gen <https://github.com/devilbox/vhost-gen>`_.
|
The whole process is based on a project called `vhost-gen <https://github.com/devilbox/vhost-gen>`_.
|
||||||
A virtual host generator for Apache 2.2, Apache 2.4 and any Nginx version.
|
A virtual host generator for Apache 2.2, Apache 2.4 and any Nginx version.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
**Customize your virtual host**
|
**Customize your virtual host**
|
||||||
When you want to find out more how to actually customize each virtual host to its own need,
|
When you want to find out more how to actually customize each virtual host to its own need,
|
||||||
read up more on :ref:`custom_vhost`.
|
read up more on :ref:`custom_vhost`.
|
||||||
**Tutorials**
|
**Tutorials**
|
||||||
Also have a look at this tutorial which is a walk-through showing you how to modify
|
Also have a look at this tutorial which is a walk-through showing you how to modify
|
||||||
a virtual host and make it serve all files for multiple sub domains (server names):
|
a virtual host and make it serve all files for multiple sub domains (server names):
|
||||||
:ref:`tutorial_adding_sub_domains`
|
:ref:`tutorial_adding_sub_domains`
|
||||||
|
|
||||||
|
|
||||||
MySQL
|
MySQL
|
||||||
@ -1413,7 +1400,7 @@ be able to display information inside the bundled intranet.
|
|||||||
+-------------------------+-------------------+---------------------+
|
+-------------------------+-------------------+---------------------+
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Keep this variable in sync with the actual MySQL root password.
|
Keep this variable in sync with the actual MySQL root password.
|
||||||
|
|
||||||
|
|
||||||
MYSQL_GENERAL_LOG
|
MYSQL_GENERAL_LOG
|
||||||
@ -1452,7 +1439,7 @@ connect to PostgreSQL and will not be able to display information inside the bun
|
|||||||
+-------------------------+---------------------+---------------------+
|
+-------------------------+---------------------+---------------------+
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Keep this variable in sync with the actual PostgreSQL username.
|
Keep this variable in sync with the actual PostgreSQL username.
|
||||||
|
|
||||||
|
|
||||||
PGSQL_ROOT_PASSWORD
|
PGSQL_ROOT_PASSWORD
|
||||||
@ -1470,7 +1457,7 @@ connect to PostgreSQL and will not be able to display information inside the bun
|
|||||||
+-------------------------+---------------------+---------------------+
|
+-------------------------+---------------------+---------------------+
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Keep this variable in sync with the actual PostgreSQL password.
|
Keep this variable in sync with the actual PostgreSQL password.
|
||||||
|
|
||||||
|
|
||||||
Bind
|
Bind
|
||||||
@ -1497,14 +1484,14 @@ Some examples:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
BIND_DNS_RESOLVER='8.8.8.8'
|
BIND_DNS_RESOLVER='8.8.8.8'
|
||||||
BIND_DNS_RESOLVER='8.8.8.8,192.168.0.10'
|
BIND_DNS_RESOLVER='8.8.8.8,192.168.0.10'
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
If you don't trust the Google DNS server, then set it to something else.
|
If you don't trust the Google DNS server, then set it to something else.
|
||||||
If you already have a DNS server inside your LAN and also want your custom DNS (if any)
|
If you already have a DNS server inside your LAN and also want your custom DNS (if any)
|
||||||
to be available inside the containers, set the value to its IP address.
|
to be available inside the containers, set the value to its IP address.
|
||||||
|
|
||||||
|
|
||||||
BIND_DNSSEC_VALIDATE
|
BIND_DNSSEC_VALIDATE
|
||||||
@ -1550,8 +1537,8 @@ This variable controls the DNS TTL in seconds. If empty or removed it will fallb
|
|||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
|
|
||||||
* `BIND TTL <http://www.zytrax.com/books/dns/apa/ttl.html>`_
|
* `BIND TTL <http://www.zytrax.com/books/dns/apa/ttl.html>`_
|
||||||
* `BIND SOA <http://www.zytrax.com/books/dns/ch8/soa.html>`_
|
* `BIND SOA <http://www.zytrax.com/books/dns/ch8/soa.html>`_
|
||||||
|
|
||||||
BIND_REFRESH_TIME
|
BIND_REFRESH_TIME
|
||||||
^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^
|
||||||
|
@ -10,10 +10,10 @@ MySQL version.
|
|||||||
|
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
When using :ref:`docker_toolbox` on Windows, ``*.cnf`` files must have read-only file
|
When using :ref:`docker_toolbox` on Windows, ``*.cnf`` files must have read-only file
|
||||||
permissions, otherwise they are not sourced by the MySQL server.
|
permissions, otherwise they are not sourced by the MySQL server.
|
||||||
|
|
||||||
Make sure to ``chmod 0444 *.cnf`` after adding your values.
|
Make sure to ``chmod 0444 *.cnf`` after adding your values.
|
||||||
|
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
@ -29,19 +29,19 @@ See the directory structure for MySQL configuration directories inside ``./cfg/`
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ls -l path/to/devilbox/cfg/ | grep -E 'mysql|mariadb|percona'
|
host> ls -l path/to/devilbox/cfg/ | grep -E 'mysql|mariadb|percona'
|
||||||
|
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.0/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.0/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.1/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.1/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.2/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.2/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.3/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mariadb-10.3/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mysql-5.5/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mysql-5.5/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mysql-5.6/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mysql-5.6/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mysql-5.7/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mysql-5.7/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mysql-8.0/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 mysql-8.0/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 percona-5.5/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 percona-5.5/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 percona-5.6/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 percona-5.6/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 percona-5.7/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 percona-5.7/
|
||||||
|
|
||||||
Customization is achieved by placing a file into ``cfg/mysql-X.X/``, ``cfg/mariadb-X.X/`` or
|
Customization is achieved by placing a file into ``cfg/mysql-X.X/``, ``cfg/mariadb-X.X/`` or
|
||||||
``cfg/percona-X-X`` (where ``X.X`` stands for your MySQL version).
|
``cfg/percona-X-X`` (where ``X.X`` stands for your MySQL version).
|
||||||
@ -66,23 +66,22 @@ of MySQL 5.5 to 16 MB.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to MySQL 5.5 config directory
|
# Navigate to MySQL 5.5 config directory
|
||||||
host> cd cfg/mysql-5.5
|
host> cd cfg/mysql-5.5
|
||||||
|
|
||||||
# Create new cnf file
|
# Create new cnf file
|
||||||
host> touch key_buffer_size.cnf
|
host> touch key_buffer_size.cnf
|
||||||
|
|
||||||
Now add the following content to the file:
|
Now add the following content to the file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
:name: memory_limit.cnf
|
:caption: memory_limit.cnf
|
||||||
:caption: memory_limit.cnf
|
|
||||||
|
|
||||||
[mysqld]
|
[mysqld]
|
||||||
key_buffer_size=16M
|
key_buffer_size=16M
|
||||||
|
|
||||||
In order to apply the changes you need to restart the Devilbox.
|
In order to apply the changes you need to restart the Devilbox.
|
||||||
You can validate that the changes have taken place by visiting the Devilbox intranet MySQL info page.
|
You can validate that the changes have taken place by visiting the Devilbox intranet MySQL info page.
|
||||||
@ -99,24 +98,23 @@ of PerconaDB 5.7
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to PerconaDB 5.7 config directory
|
# Navigate to PerconaDB 5.7 config directory
|
||||||
host> cd cfg/percona-5.7
|
host> cd cfg/percona-5.7
|
||||||
|
|
||||||
# Create new ini file
|
# Create new ini file
|
||||||
host> touch timeouts.cnf
|
host> touch timeouts.cnf
|
||||||
|
|
||||||
Now add the following content to the file:
|
Now add the following content to the file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
:name: timeouts.cnf
|
:caption: timeouts.cnf
|
||||||
:caption: timeouts.cnf
|
|
||||||
|
|
||||||
[mysqld]
|
[mysqld]
|
||||||
max_allowed_packet=256M
|
max_allowed_packet=256M
|
||||||
wait_timeout = 86400
|
wait_timeout = 86400
|
||||||
|
|
||||||
In order to apply the changes you need to restart the Devilbox.
|
In order to apply the changes you need to restart the Devilbox.
|
||||||
You can validate that the changes have taken place by visiting the Devilbox intranet MySQL info page.
|
You can validate that the changes have taken place by visiting the Devilbox intranet MySQL info page.
|
||||||
|
@ -11,9 +11,9 @@ supplying custom configurations.
|
|||||||
.. seealso:: If you are rather using Apache, have a look at: :ref:`apache_conf`
|
.. seealso:: If you are rather using Apache, have a look at: :ref:`apache_conf`
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
You could actually also create virtual hosts here, but it is recommended to use the
|
You could actually also create virtual hosts here, but it is recommended to use the
|
||||||
Devilbox Auto-vhost generation feature. If you want to custimize your current virtual hosts
|
Devilbox Auto-vhost generation feature. If you want to custimize your current virtual hosts
|
||||||
have a look at :ref:`custom_vhost`.
|
have a look at :ref:`custom_vhost`.
|
||||||
|
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
@ -29,10 +29,10 @@ See the directory structure for Nginx configuration directories inside ``./cfg/`
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ls -l path/to/devilbox/cfg/ | grep 'nginx'
|
host> ls -l path/to/devilbox/cfg/ | grep 'nginx'
|
||||||
|
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 nginx-mainline/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 nginx-mainline/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 nginx-stable/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 nginx-stable/
|
||||||
|
|
||||||
Customization is achieved by placing a file into ``cfg/nginx-X/`` (where ``X`` stands for
|
Customization is achieved by placing a file into ``cfg/nginx-X/`` (where ``X`` stands for
|
||||||
your Nginx flavoour). The file must end by ``.conf`` in order to be sourced by the web server.
|
your Nginx flavoour). The file must end by ``.conf`` in order to be sourced by the web server.
|
||||||
@ -59,31 +59,30 @@ values of Nginx stable.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to Nginx stable config directory
|
# Navigate to Nginx stable config directory
|
||||||
host> cd cfg/nginx-stable
|
host> cd cfg/nginx-stable
|
||||||
|
|
||||||
# Create new conf file
|
# Create new conf file
|
||||||
host> touch keep_alive.conf
|
host> touch keep_alive.conf
|
||||||
|
|
||||||
Now add the following content to the file:
|
Now add the following content to the file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
:name: keep_alive.conf
|
:caption: keep_alive.conf
|
||||||
:caption: keep_alive.conf
|
|
||||||
|
|
||||||
keepalive 10;
|
keepalive 10;
|
||||||
keepalive_timeout 10s;
|
keepalive_timeout 10s;
|
||||||
keepalive_requests 100;
|
keepalive_requests 100;
|
||||||
|
|
||||||
In order to apply the changes you need to restart the Devilbox.
|
In order to apply the changes you need to restart the Devilbox.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The above is just an example demonstration, you probably need other values for your setup.
|
The above is just an example demonstration, you probably need other values for your setup.
|
||||||
So make sure to understand how to configure Nginx, if you are going to change any of those
|
So make sure to understand how to configure Nginx, if you are going to change any of those
|
||||||
settings.
|
settings.
|
||||||
|
|
||||||
|
|
||||||
Adjust timeout settings for Nginx mainline
|
Adjust timeout settings for Nginx mainline
|
||||||
@ -98,28 +97,27 @@ and
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to Nginx mainline config directory
|
# Navigate to Nginx mainline config directory
|
||||||
host> cd cfg/nginx-mainline
|
host> cd cfg/nginx-mainline
|
||||||
|
|
||||||
# Create new conf file
|
# Create new conf file
|
||||||
host> touch timeouts.conf
|
host> touch timeouts.conf
|
||||||
|
|
||||||
Now add the following content to the file:
|
Now add the following content to the file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
:name: timeouts.conf
|
:caption: timeouts.conf
|
||||||
:caption: timeouts.conf
|
|
||||||
|
|
||||||
client_body_timeout 60s;
|
client_body_timeout 60s;
|
||||||
client_header_timeout 60s;
|
client_header_timeout 60s;
|
||||||
send_timeout 60s;
|
send_timeout 60s;
|
||||||
|
|
||||||
In order to apply the changes you need to restart the Devilbox.
|
In order to apply the changes you need to restart the Devilbox.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The above is just an example demonstration, you probably need other values for your setup.
|
The above is just an example demonstration, you probably need other values for your setup.
|
||||||
So make sure to understand how to configure Nginx, if you are going to change any of those
|
So make sure to understand how to configure Nginx, if you are going to change any of those
|
||||||
settings.
|
settings.
|
||||||
|
@ -22,23 +22,23 @@ These changes affect the PHP-FPM process itself, global as well as pool specific
|
|||||||
be set.
|
be set.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The default PHP-FPM pool is called ``www`` in case you want to make changes to it.
|
The default PHP-FPM pool is called ``www`` in case you want to make changes to it.
|
||||||
|
|
||||||
|
|
||||||
See the directory structure for PHP-FPM configuration directories inside ``./cfg/`` directory:
|
See the directory structure for PHP-FPM configuration directories inside ``./cfg/`` directory:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ls -l path/to/devilbox/cfg/ | grep 'php-fpm'
|
host> ls -l path/to/devilbox/cfg/ | grep 'php-fpm'
|
||||||
|
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-5.3/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-5.3/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-5.4/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-5.4/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-5.5/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-5.5/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Apr 3 22:04 php-fpm-5.6/
|
drwxr-xr-x 2 cytopia cytopia 4096 Apr 3 22:04 php-fpm-5.6/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-7.0/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-7.0/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-7.1/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-7.1/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-7.2/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-7.2/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-7.3/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-fpm-7.3/
|
||||||
|
|
||||||
Customization is achieved by placing a file into ``cfg/php-fpm-X.X/`` (where ``X.X`` stands for
|
Customization is achieved by placing a file into ``cfg/php-fpm-X.X/`` (where ``X.X`` stands for
|
||||||
your PHP version). The file must end by ``.conf`` in order to be sourced by the PHP-FPM server.
|
your PHP version). The file must end by ``.conf`` in order to be sourced by the PHP-FPM server.
|
||||||
@ -50,8 +50,8 @@ This file holds some example values that can be adjusted or commented out.
|
|||||||
In order for the changes to be applied, you will have to restart the Devilbox.
|
In order for the changes to be applied, you will have to restart the Devilbox.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
To find out about all available PHP-FPM directives, global or pool specific have a look
|
To find out about all available PHP-FPM directives, global or pool specific have a look
|
||||||
at its documentation: https://secure.php.net/manual/en/install.fpm.configuration.php
|
at its documentation: https://secure.php.net/manual/en/install.fpm.configuration.php
|
||||||
|
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
@ -66,23 +66,22 @@ of PHP-FPM 7.1 master process to 100.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to PHP 7.1 config directory
|
# Navigate to PHP 7.1 config directory
|
||||||
host> cd cfg/php-fpm-7.1
|
host> cd cfg/php-fpm-7.1
|
||||||
|
|
||||||
# Create new conf file
|
# Create new conf file
|
||||||
host> touch rlimit.conf
|
host> touch rlimit.conf
|
||||||
|
|
||||||
Now add the following content to the file:
|
Now add the following content to the file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
:name: rlimit.conf
|
:caption: rlimit.conf
|
||||||
:caption: rlimit.conf
|
|
||||||
|
|
||||||
[global]
|
[global]
|
||||||
rlimit_core = 100
|
rlimit_core = 100
|
||||||
|
|
||||||
.. important:: Note the ``[global]`` section.
|
.. important:: Note the ``[global]`` section.
|
||||||
|
|
||||||
@ -103,28 +102,27 @@ of PHP-FPM 5.6 on pool ``www``.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to PHP 5.6 config directory
|
# Navigate to PHP 5.6 config directory
|
||||||
host> cd cfg/php-fpm-5.6
|
host> cd cfg/php-fpm-5.6
|
||||||
|
|
||||||
# Create new conf file
|
# Create new conf file
|
||||||
host> touch www_server.conf
|
host> touch www_server.conf
|
||||||
|
|
||||||
Now add the following content to the file:
|
Now add the following content to the file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
:name: www_server.conf
|
:caption: www_server.conf
|
||||||
:caption: www_server.conf
|
|
||||||
|
|
||||||
[www]
|
[www]
|
||||||
; Pool config
|
; Pool config
|
||||||
pm = dynamic
|
pm = dynamic
|
||||||
pm.max_children = 10
|
pm.max_children = 10
|
||||||
pm.start_servers = 3
|
pm.start_servers = 3
|
||||||
pm.min_spare_servers = 2
|
pm.min_spare_servers = 2
|
||||||
pm.max_spare_servers = 5
|
pm.max_spare_servers = 5
|
||||||
|
|
||||||
.. important:: Note the ``[www]`` section.
|
.. important:: Note the ``[www]`` section.
|
||||||
|
|
||||||
@ -146,33 +144,32 @@ The following example will disable built-in PHP functions globally and non-overw
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to PHP 7.0 config directory
|
# Navigate to PHP 7.0 config directory
|
||||||
host> cd cfg/php-fpm-7.0
|
host> cd cfg/php-fpm-7.0
|
||||||
|
|
||||||
# Create new conf file
|
# Create new conf file
|
||||||
host> touch admin.conf
|
host> touch admin.conf
|
||||||
|
|
||||||
Now add the following content to the file:
|
Now add the following content to the file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
:name: admin.conf
|
:caption: admin.conf
|
||||||
:caption: admin.conf
|
|
||||||
|
|
||||||
[www]
|
[www]
|
||||||
php_admin_value[disable_functions] = link,symlink,popen,exec,system,shell_exec
|
php_admin_value[disable_functions] = link,symlink,popen,exec,system,shell_exec
|
||||||
|
|
||||||
.. important:: Note the ``[www]`` section.
|
.. important:: Note the ``[www]`` section.
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
This kind of setting only has affects PHP files served through PHP-FPM, when you run php
|
This kind of setting only has affects PHP files served through PHP-FPM, when you run php
|
||||||
on the command line, this setting will be ignored.
|
on the command line, this setting will be ignored.
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
Be aware that none of your projects can use the above disabled functions anymore.
|
Be aware that none of your projects can use the above disabled functions anymore.
|
||||||
They will simply not exist for PHP 7.0 after that configuration took affect.
|
They will simply not exist for PHP 7.0 after that configuration took affect.
|
||||||
|
|
||||||
In order to apply the changes you need to restart the Devilbox.
|
In order to apply the changes you need to restart the Devilbox.
|
||||||
|
|
||||||
|
@ -22,16 +22,16 @@ See the directory structure for PHP configuration directories inside ``./cfg/``
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ls -l path/to/devilbox/cfg/ | grep 'php-ini'
|
host> ls -l path/to/devilbox/cfg/ | grep 'php-ini'
|
||||||
|
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-5.3/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-5.3/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-5.4/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-5.4/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-5.5/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-5.5/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Apr 3 22:04 php-ini-5.6/
|
drwxr-xr-x 2 cytopia cytopia 4096 Apr 3 22:04 php-ini-5.6/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-7.0/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-7.0/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-7.1/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-7.1/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-7.2/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-7.2/
|
||||||
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-7.3/
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-ini-7.3/
|
||||||
|
|
||||||
Customization is achieved by placing a file into ``cfg/php-ini-X.X/`` (where ``X.X`` stands for
|
Customization is achieved by placing a file into ``cfg/php-ini-X.X/`` (where ``X.X`` stands for
|
||||||
your PHP version). The file must end by ``.ini`` in order to be sourced by the PHP-FPM server.
|
your PHP version). The file must end by ``.ini`` in order to be sourced by the PHP-FPM server.
|
||||||
@ -55,23 +55,22 @@ The following examples shows you how to change the
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to PHP 7.1 config directory
|
# Navigate to PHP 7.1 config directory
|
||||||
host> cd cfg/php-ini-7.1
|
host> cd cfg/php-ini-7.1
|
||||||
|
|
||||||
# Create new ini file
|
# Create new ini file
|
||||||
host> touch memory_limit.ini
|
host> touch memory_limit.ini
|
||||||
|
|
||||||
Now add the following content to the file:
|
Now add the following content to the file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
:name: memory_limit.ini
|
:caption: memory_limit.ini
|
||||||
:caption: memory_limit.ini
|
|
||||||
|
|
||||||
[PHP]
|
[PHP]
|
||||||
memory_limit = 4096M
|
memory_limit = 4096M
|
||||||
|
|
||||||
In order to apply the changes you need to restart the Devilbox.
|
In order to apply the changes you need to restart the Devilbox.
|
||||||
You can validate that the changes have taken place by visiting the Devilbox intranet phpinfo page.
|
You can validate that the changes have taken place by visiting the Devilbox intranet phpinfo page.
|
||||||
@ -87,24 +86,23 @@ of PHP 5.6.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to PHP 5.6 config directory
|
# Navigate to PHP 5.6 config directory
|
||||||
host> cd cfg/php-ini-5.6
|
host> cd cfg/php-ini-5.6
|
||||||
|
|
||||||
# Create new ini file
|
# Create new ini file
|
||||||
host> touch timeouts.ini
|
host> touch timeouts.ini
|
||||||
|
|
||||||
Now add the following content to the file:
|
Now add the following content to the file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
:name: timeouts.ini
|
:caption: timeouts.ini
|
||||||
:caption: timeouts.ini
|
|
||||||
|
|
||||||
[PHP]
|
[PHP]
|
||||||
max_execution_time = 180
|
max_execution_time = 180
|
||||||
max_input_time = 180
|
max_input_time = 180
|
||||||
|
|
||||||
In order to apply the changes you need to restart the Devilbox.
|
In order to apply the changes you need to restart the Devilbox.
|
||||||
You can validate that the changes have taken place by visiting the Devilbox intranet phpinfo page.
|
You can validate that the changes have taken place by visiting the Devilbox intranet phpinfo page.
|
||||||
|
@ -8,8 +8,8 @@ If you don't want to add DNS records manually for every project, you can also us
|
|||||||
DNS server and use it's DNS catch-all feature to have all DNS records automatically available.
|
DNS server and use it's DNS catch-all feature to have all DNS records automatically available.
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
By default, the DNS server is set to listen on ``1053`` to avoid port collisions during startup.
|
By default, the DNS server is set to listen on ``1053`` to avoid port collisions during startup.
|
||||||
You need to change it to ``53`` in ``.env`` via :ref:`env_host_port_bind`.
|
You need to change it to ``53`` in ``.env`` via :ref:`env_host_port_bind`.
|
||||||
|
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
@ -34,34 +34,32 @@ Prerequisites
|
|||||||
First ensure that :ref:`env_local_listen_addr` is either empty or listening on ``127.0.0.1``.
|
First ensure that :ref:`env_local_listen_addr` is either empty or listening on ``127.0.0.1``.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
:emphasize-lines: 3
|
||||||
:emphasize-lines: 3
|
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> vi .env
|
host> vi .env
|
||||||
LOCAL_LISTEN_ADDR=
|
LOCAL_LISTEN_ADDR=
|
||||||
|
|
||||||
Then you need to ensure that :ref:`env_host_port_bind` is set to ``53``.
|
Then you need to ensure that :ref:`env_host_port_bind` is set to ``53``.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
:emphasize-lines: 3
|
||||||
:emphasize-lines: 3
|
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> vi .env
|
host> vi .env
|
||||||
HOST_PORT_BIND=53
|
HOST_PORT_BIND=53
|
||||||
|
|
||||||
Before starting up the Devilbox, ensure that port ``53`` is not already used on ``127.0.0.1``.
|
Before starting up the Devilbox, ensure that port ``53`` is not already used on ``127.0.0.1``.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
host> netstat -an | grep -E 'LISTEN\s*$'
|
host> netstat -an | grep -E 'LISTEN\s*$'
|
||||||
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
|
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
|
||||||
tcp 0 0 127.0.0.1:43477 0.0.0.0:* LISTEN
|
tcp 0 0 127.0.0.1:43477 0.0.0.0:* LISTEN
|
||||||
tcp 0 0 127.0.0.1:50267 0.0.0.0:* LISTEN
|
tcp 0 0 127.0.0.1:50267 0.0.0.0:* LISTEN
|
||||||
|
|
||||||
If you see port ``53`` already being used as in the above example, ensure to stop any
|
If you see port ``53`` already being used as in the above example, ensure to stop any
|
||||||
DNS resolver, otherwise it does not work.
|
DNS resolver, otherwise it does not work.
|
||||||
@ -70,9 +68,9 @@ The output should look like this (It is only important that there is no ``:53``.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> netstat -an | grep -E 'LISTEN\s*$'
|
host> netstat -an | grep -E 'LISTEN\s*$'
|
||||||
tcp 0 0 127.0.0.1:43477 0.0.0.0:* LISTEN
|
tcp 0 0 127.0.0.1:43477 0.0.0.0:* LISTEN
|
||||||
tcp 0 0 127.0.0.1:50267 0.0.0.0:* LISTEN
|
tcp 0 0 127.0.0.1:50267 0.0.0.0:* LISTEN
|
||||||
|
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
@ -91,20 +89,19 @@ are changed, you always want to have an additional entry, which is the one from
|
|||||||
Add the following line to to the very beginning to ``/etc/dhcp/dhclient.conf``:
|
Add the following line to to the very beginning to ``/etc/dhcp/dhclient.conf``:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/dhcp/dhclient.conf
|
:caption: /etc/dhcp/dhclient.conf
|
||||||
:name: /etc/dhcp/dhclient.conf
|
|
||||||
|
|
||||||
prepend domain-name-servers 127.0.0.1;
|
prepend domain-name-servers 127.0.0.1;
|
||||||
|
|
||||||
When you do that for the first time, you need to restart the ``network-manager`` service.
|
When you do that for the first time, you need to restart the ``network-manager`` service.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Via service command
|
# Via service command
|
||||||
host> sudo service network-manager restart
|
host> sudo service network-manager restart
|
||||||
|
|
||||||
# Or the systemd way
|
# Or the systemd way
|
||||||
host> sudo systemctl restart network-manager
|
host> sudo systemctl restart network-manager
|
||||||
|
|
||||||
This will make sure that whenever your /etc/resolv.conf is deployed, you will have ``127.0.0.1``
|
This will make sure that whenever your /etc/resolv.conf is deployed, you will have ``127.0.0.1``
|
||||||
as the first entry and also make use of any other DNS server which are deployed via the LAN's DHCP server.
|
as the first entry and also make use of any other DNS server which are deployed via the LAN's DHCP server.
|
||||||
@ -120,33 +117,31 @@ In case you are using systemd-resolved instead of NetworkManager, add the follow
|
|||||||
the very beginning to ``/etc/resolv.conf.head``:
|
the very beginning to ``/etc/resolv.conf.head``:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/resolv.conf.head
|
:caption: /etc/resolv.conf.head
|
||||||
:name: /etc/resolv.conf.head
|
|
||||||
|
|
||||||
nameserver 127.0.0.1
|
nameserver 127.0.0.1
|
||||||
|
|
||||||
Prevent NetworkManager from modifying ``/etc/resolv.conf`` and leave everything to
|
Prevent NetworkManager from modifying ``/etc/resolv.conf`` and leave everything to
|
||||||
systemd-resolved by adding the following line under the ``[main]`` section of
|
systemd-resolved by adding the following line under the ``[main]`` section of
|
||||||
``/etc/NetworkManager/NetworkManager.conf``
|
``/etc/NetworkManager/NetworkManager.conf``
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/NetworkManager/NetworkManager.conf
|
:caption: /etc/NetworkManager/NetworkManager.conf
|
||||||
:name: /etc/NetworkManager/NetworkManager.conf
|
|
||||||
|
|
||||||
dns=none
|
dns=none
|
||||||
|
|
||||||
As a last step you will have to restart ``systemd-resolved``.
|
As a last step you will have to restart ``systemd-resolved``.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> sudo systemctl stop systemd-resolved
|
host> sudo systemctl stop systemd-resolved
|
||||||
host> sudo systemctl start systemd-resolved
|
host> sudo systemctl start systemd-resolved
|
||||||
|
|
||||||
Once done, you can verify if the new DNS settings are effective:
|
Once done, you can verify if the new DNS settings are effective:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> systemd-resolve --status
|
host> systemd-resolve --status
|
||||||
|
|
||||||
.. seealso:: `Archlinux Wiki: resolv.conf <https://wiki.archlinux.org/index.php/Resolv.conf#Modify_the_dhcpcd_config>`_
|
.. seealso:: `Archlinux Wiki: resolv.conf <https://wiki.archlinux.org/index.php/Resolv.conf#Modify_the_dhcpcd_config>`_
|
||||||
|
|
||||||
|
@ -38,11 +38,11 @@ manually, i.e. they are not overwritten.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> ls -l ca/
|
host> ls -l ca/
|
||||||
-rw-r--r-- 1 cytopia cytopia 1558 May 2 11:12 devilbox-ca.crt
|
-rw-r--r-- 1 cytopia cytopia 1558 May 2 11:12 devilbox-ca.crt
|
||||||
-rw------- 1 cytopia cytopia 1675 May 2 11:12 devilbox-ca.key
|
-rw------- 1 cytopia cytopia 1675 May 2 11:12 devilbox-ca.key
|
||||||
-rw-r--r-- 1 cytopia cytopia 17 May 4 08:35 devilbox-ca.srl
|
-rw-r--r-- 1 cytopia cytopia 17 May 4 08:35 devilbox-ca.srl
|
||||||
|
|
||||||
|
|
||||||
SSL Certificates
|
SSL Certificates
|
||||||
@ -60,8 +60,8 @@ into your browser ones and all current projects and future projects will automat
|
|||||||
valid and trusted SSL certificates without any further work.
|
valid and trusted SSL certificates without any further work.
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
Importing the CA into the browser is also recommended and required for the Devilbox
|
Importing the CA into the browser is also recommended and required for the Devilbox
|
||||||
intranet page to work properly.
|
intranet page to work properly.
|
||||||
|
|
||||||
|
|
||||||
Import the CA into your browser
|
Import the CA into your browser
|
||||||
|
@ -23,12 +23,12 @@ listening ports.
|
|||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
|
|
||||||
If you intend to use ``vhost-gen`` for your own projects, have a look at its projcet page and
|
If you intend to use ``vhost-gen`` for your own projects, have a look at its projcet page and
|
||||||
its sister projects:
|
its sister projects:
|
||||||
|
|
||||||
* `vhost-gen <https://github.com/devilbox/vhost-gen>`_
|
* `vhost-gen <https://github.com/devilbox/vhost-gen>`_
|
||||||
* `watcherd <https://github.com/devilbox/watcherd>`_
|
* `watcherd <https://github.com/devilbox/watcherd>`_
|
||||||
* `watcherp <https://github.com/devilbox/watcherp>`_
|
* `watcherp <https://github.com/devilbox/watcherp>`_
|
||||||
|
|
||||||
|
|
||||||
Where do I find templates
|
Where do I find templates
|
||||||
@ -99,7 +99,7 @@ it will change the `Project template path` which you need to create yourself.
|
|||||||
For this example we will keep the default value for the sake of simplicity: ``.devilxbox``.
|
For this example we will keep the default value for the sake of simplicity: ``.devilxbox``.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The :ref:`env_httpd_template_dir` value is a global setting and will affect all projects.
|
The :ref:`env_httpd_template_dir` value is a global setting and will affect all projects.
|
||||||
|
|
||||||
|
|
||||||
2. Copy webserver template to project template directory
|
2. Copy webserver template to project template directory
|
||||||
@ -109,23 +109,23 @@ First you need to ensure that the :ref:`env_httpd_template_dir` exists wihin you
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd /home/user/devilbox
|
host> cd /home/user/devilbox
|
||||||
|
|
||||||
# Create template directory in your project
|
# Create template directory in your project
|
||||||
host> mkdir ./data/www/project-1/.devilbox
|
host> mkdir ./data/www/project-1/.devilbox
|
||||||
|
|
||||||
Then you can copy the templates.
|
Then you can copy the templates.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> cp templates/vhost-gen/* ./data/www/project-1/.devilbox
|
host> cp templates/vhost-gen/* ./data/www/project-1/.devilbox
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
You actually only need to copy the template of your chosen webserver (either Apache 2.2,
|
You actually only need to copy the template of your chosen webserver (either Apache 2.2,
|
||||||
Apache 2.4 or Nginx), however it is good practice to copy all templates and also adjust
|
Apache 2.4 or Nginx), however it is good practice to copy all templates and also adjust
|
||||||
all templates synchronously. This allows you to change web server versions and still
|
all templates synchronously. This allows you to change web server versions and still
|
||||||
keep your virtual host settings.
|
keep your virtual host settings.
|
||||||
|
|
||||||
3. Adjust template
|
3. Adjust template
|
||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
@ -167,42 +167,42 @@ needs to be in place for what webserver version.
|
|||||||
+----------------+------------------+
|
+----------------+------------------+
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Nginx stable and mainline share the same template as their syntax has no special
|
Nginx stable and mainline share the same template as their syntax has no special
|
||||||
differences, whereas Apache 2.2 and Apache 2.4 have slight differences in syntax and therefore
|
differences, whereas Apache 2.2 and Apache 2.4 have slight differences in syntax and therefore
|
||||||
require two different templates.
|
require two different templates.
|
||||||
|
|
||||||
|
|
||||||
Ensure yaml files are valid
|
Ensure yaml files are valid
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Pay close attention that you do not use TAB (``\t``) characters for indenting the vhost-gen
|
Pay close attention that you do not use TAB (``\t``) characters for indenting the vhost-gen
|
||||||
yaml files. Some editors might automatically indent using TABs, so ensure they are replaced
|
yaml files. Some editors might automatically indent using TABs, so ensure they are replaced
|
||||||
with spaces. If TAB characters are present, those files become invalid and won't work.
|
with spaces. If TAB characters are present, those files become invalid and won't work.
|
||||||
https://github.com/cytopia/devilbox/issues/142
|
https://github.com/cytopia/devilbox/issues/142
|
||||||
|
|
||||||
You can use the bundled ``yamllint`` binary inside the container to validate your config.
|
You can use the bundled ``yamllint`` binary inside the container to validate your config.
|
||||||
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 13-16
|
:emphasize-lines: 13-16
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd /home/user/devilbox
|
host> cd /home/user/devilbox
|
||||||
|
|
||||||
# Enter the PHP container
|
# Enter the PHP container
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
# Go to your project's template directory
|
# Go to your project's template directory
|
||||||
devilbox@php-7.0.19 in /shared/httpd $ cd project-1/.devilbox
|
devilbox@php-7.0.19 in /shared/httpd $ cd project-1/.devilbox
|
||||||
|
|
||||||
# Check the syntax of apache22.yml
|
# Check the syntax of apache22.yml
|
||||||
devilbox@php-7.0.19 in /shared/httpd/project-1/.devilbox $ yamllint apache22.yml
|
devilbox@php-7.0.19 in /shared/httpd/project-1/.devilbox $ yamllint apache22.yml
|
||||||
|
|
||||||
108:81 error line too long (90 > 80 characters) (line-length)
|
108:81 error line too long (90 > 80 characters) (line-length)
|
||||||
139:81 error line too long (100 > 80 characters) (line-length)
|
139:81 error line too long (100 > 80 characters) (line-length)
|
||||||
140:81 error line too long (84 > 80 characters) (line-length)
|
140:81 error line too long (84 > 80 characters) (line-length)
|
||||||
142:81 error line too long (137 > 80 characters) (line-length)
|
142:81 error line too long (137 > 80 characters) (line-length)
|
||||||
|
|
||||||
Long line errors can safely be ignored.
|
Long line errors can safely be ignored.
|
||||||
|
|
||||||
@ -280,29 +280,29 @@ look like this:
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
vhost: |
|
vhost: |
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName example.com
|
ServerName example.com
|
||||||
|
|
||||||
CustomLog "/var/log/apache/access.log" combined
|
CustomLog "/var/log/apache/access.log" combined
|
||||||
ErrorLog "/var/log/apache/error.log"
|
ErrorLog "/var/log/apache/error.log"
|
||||||
|
|
||||||
DocumentRoot "/shared/httpd/project-1/htdocs"
|
DocumentRoot "/shared/httpd/project-1/htdocs"
|
||||||
<Directory "/shared/httpd/project-1/htdocs">
|
<Directory "/shared/httpd/project-1/htdocs">
|
||||||
DirectoryIndex index.php
|
DirectoryIndex index.php
|
||||||
|
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
Options All
|
Options All
|
||||||
|
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
RewriteBase /
|
RewriteBase /
|
||||||
|
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow from all
|
Allow from all
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/shared/httpd/project-1/htdocs/$1
|
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/shared/httpd/project-1/htdocs/$1
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
2. ``vhost_type:``
|
2. ``vhost_type:``
|
||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
@ -360,34 +360,34 @@ Rename project directory
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the data directory
|
# Navigate to the data directory
|
||||||
host> /home/user/devilbox/data/www
|
host> /home/user/devilbox/data/www
|
||||||
|
|
||||||
# Rename your project to something else
|
# Rename your project to something else
|
||||||
host> mv project-1 project-1.tmp
|
host> mv project-1 project-1.tmp
|
||||||
|
|
||||||
# Rename your project to its original name
|
# Rename your project to its original name
|
||||||
host> mv project-1.tmp project-1
|
host> mv project-1.tmp project-1
|
||||||
|
|
||||||
If you want to understand what is going on right now, check the docker logs for the web server.
|
If you want to understand what is going on right now, check the docker logs for the web server.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the devilbox directory
|
# Navigate to the devilbox directory
|
||||||
host> /home/user/devilbox
|
host> /home/user/devilbox
|
||||||
|
|
||||||
# Check docker logs
|
# Check docker logs
|
||||||
host> docker-compose logs httpd
|
host> docker-compose logs httpd
|
||||||
|
|
||||||
httpd_1 | vhostgen: [2018-03-18 11:46:52] Adding: project-1.tmp.loc
|
httpd_1 | vhostgen: [2018-03-18 11:46:52] Adding: project-1.tmp.loc
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] ADD: succeeded: /shared/httpd/project-1.tmp
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] ADD: succeeded: /shared/httpd/project-1.tmp
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] DEL: succeeded: /shared/httpd/project-1
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] DEL: succeeded: /shared/httpd/project-1
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] TRIGGER succeeded: /usr/local/apache2/bin/httpd -k restart
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] TRIGGER succeeded: /usr/local/apache2/bin/httpd -k restart
|
||||||
|
|
||||||
httpd_1 | vhostgen: [2018-03-18 11:46:52] Adding: project-1loc
|
httpd_1 | vhostgen: [2018-03-18 11:46:52] Adding: project-1loc
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] ADD: succeeded: /shared/httpd/project-1
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] ADD: succeeded: /shared/httpd/project-1
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] DEL: succeeded: /shared/httpd/project-1.tmp
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] DEL: succeeded: /shared/httpd/project-1.tmp
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] TRIGGER succeeded: /usr/local/apache2/bin/httpd -k restart
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] TRIGGER succeeded: /usr/local/apache2/bin/httpd -k restart
|
||||||
|
|
||||||
**What happened?**
|
**What happened?**
|
||||||
|
|
||||||
@ -395,9 +395,9 @@ The directory changes have been noticed and a new virtual host has been created.
|
|||||||
your new vhost-gen template has been read and the changes have applied.
|
your new vhost-gen template has been read and the changes have applied.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Renaming a project directory will only affect a single project. In case your change the
|
Renaming a project directory will only affect a single project. In case your change the
|
||||||
value of :ref:`env_httpd_template_dir` it will affect all projects and you would have to
|
value of :ref:`env_httpd_template_dir` it will affect all projects and you would have to
|
||||||
rename all project directories. In this case it is much faster to just restart the Devilbox.
|
rename all project directories. In this case it is much faster to just restart the Devilbox.
|
||||||
|
|
||||||
|
|
||||||
Restart the Devilbox
|
Restart the Devilbox
|
||||||
@ -410,6 +410,6 @@ Further readings
|
|||||||
================
|
================
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
Have a look at the following examples which involve customizing vhost-gen templates:
|
Have a look at the following examples which involve customizing vhost-gen templates:
|
||||||
|
|
||||||
* :ref:`tutorial_adding_sub_domains`
|
* :ref:`tutorial_adding_sub_domains`
|
||||||
|
@ -11,9 +11,9 @@ The server name is constructed by a ``<project-directory>`` and the :ref:`env_tl
|
|||||||
requires the same DNS record to be present in order to access it.
|
requires the same DNS record to be present in order to access it.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
This section gives you an overview about how to create separate DNS records for each project.
|
This section gives you an overview about how to create separate DNS records for each project.
|
||||||
It has to be done for each project, however if you want to automate the process, refer
|
It has to be done for each project, however if you want to automate the process, refer
|
||||||
to :ref:`global_configuration_auto_dns`.
|
to :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
@ -36,8 +36,8 @@ See the following table for project directories and TLD_SUFFIX.
|
|||||||
+-------------------+------------+--------------------------+-----------------------+
|
+-------------------+------------+--------------------------+-----------------------+
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
When you have created the above two projects, you can check the vhost page on the
|
When you have created the above two projects, you can check the vhost page on the
|
||||||
Devilbox intranet. It will tell you exactly what DNS record to add.
|
Devilbox intranet. It will tell you exactly what DNS record to add.
|
||||||
|
|
||||||
.. image:: /_static/img/devilbox-vhosts-dns.png
|
.. image:: /_static/img/devilbox-vhosts-dns.png
|
||||||
|
|
||||||
@ -66,10 +66,10 @@ uses vim to add the two example DNS records.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> sudo vim /etc/hosts
|
host> sudo vim /etc/hosts
|
||||||
|
|
||||||
127.0.0.1 project-1.loc
|
127.0.0.1 project-1.loc
|
||||||
127.0.0.1 www.project-1.loc
|
127.0.0.1 www.project-1.loc
|
||||||
|
|
||||||
|
|
||||||
MacOS
|
MacOS
|
||||||
@ -80,10 +80,10 @@ uses vim to add the two example DNS records.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> sudo vim /etc/hosts
|
host> sudo vim /etc/hosts
|
||||||
|
|
||||||
127.0.0.1 project-1.loc
|
127.0.0.1 project-1.loc
|
||||||
127.0.0.1 www.project-1.loc
|
127.0.0.1 www.project-1.loc
|
||||||
|
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
@ -94,8 +94,8 @@ and add the following two lines:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
127.0.0.1 project-1.loc
|
127.0.0.1 project-1.loc
|
||||||
127.0.0.1 www.project-1.loc
|
127.0.0.1 www.project-1.loc
|
||||||
|
|
||||||
|
|
||||||
Docker Toolbox
|
Docker Toolbox
|
||||||
@ -119,10 +119,10 @@ uses vim to add the two example DNS records.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> sudo vim /etc/hosts
|
host> sudo vim /etc/hosts
|
||||||
|
|
||||||
192.16.0.1 project-1.loc
|
192.16.0.1 project-1.loc
|
||||||
192.16.0.1 www.project-1.loc
|
192.16.0.1 www.project-1.loc
|
||||||
|
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
@ -133,8 +133,8 @@ and add the following two lines:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
192.16.0.1 project-1.loc
|
192.16.0.1 project-1.loc
|
||||||
192.16.0.1 www.project-1.loc
|
192.16.0.1 www.project-1.loc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -145,14 +145,14 @@ After settings the DNS records, you can use the ``ping`` command to verify if ev
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ping -c1 project-1.loc
|
host> ping -c1 project-1.loc
|
||||||
|
|
||||||
PING project-1.loc (127.0.0.1) 56(84) bytes of data.
|
PING project-1.loc (127.0.0.1) 56(84) bytes of data.
|
||||||
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.066 ms
|
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.066 ms
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ping -c1 www.project-1.loc
|
host> ping -c1 www.project-1.loc
|
||||||
|
|
||||||
PING www.project-1.loc (127.0.0.1) 56(84) bytes of data.
|
PING www.project-1.loc (127.0.0.1) 56(84) bytes of data.
|
||||||
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.066 ms
|
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.066 ms
|
||||||
|
@ -49,7 +49,7 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-cake
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-cake
|
||||||
|
|
||||||
|
|
||||||
3. Install CakePHP
|
3. Install CakePHP
|
||||||
@ -67,8 +67,8 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ cd my-cake
|
devilbox@php-7.0.20 in /shared/httpd $ cd my-cake
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-cake $ composer create-project --prefer-dist cakephp/app cakephp
|
devilbox@php-7.0.20 in /shared/httpd/my-cake $ composer create-project --prefer-dist cakephp/app cakephp
|
||||||
|
|
||||||
|
|
||||||
4. Symlink webroot
|
4. Symlink webroot
|
||||||
@ -76,7 +76,7 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-cake $ ln -s cakephp/webroot/ htdocs
|
devilbox@php-7.0.20 in /shared/httpd/my-cake $ ln -s cakephp/webroot/ htdocs
|
||||||
|
|
||||||
|
|
||||||
5. Add MySQL Database
|
5. Add MySQL Database
|
||||||
@ -84,7 +84,7 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-cake $ mysql -u root -h 127.0.0.1 -p -e 'CREATE DATABASE my_cake;'
|
devilbox@php-7.0.20 in /shared/httpd/my-cake $ mysql -u root -h 127.0.0.1 -p -e 'CREATE DATABASE my_cake;'
|
||||||
|
|
||||||
|
|
||||||
6. Configure database connection
|
6. Configure database connection
|
||||||
@ -92,34 +92,33 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-cake $ vi cakephp/config/app.php
|
devilbox@php-7.0.20 in /shared/httpd/my-cake $ vi cakephp/config/app.php
|
||||||
|
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
:caption: cakephp/config/app.php
|
:caption: cakephp/config/app.php
|
||||||
:name: cakephp/config/app.php
|
|
||||||
:emphasize-lines: 7,14,15,16
|
:emphasize-lines: 7,14,15,16
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
'Datasources' => [
|
'Datasources' => [
|
||||||
'default' => [
|
'default' => [
|
||||||
'className' => 'Cake\Database\Connection',
|
'className' => 'Cake\Database\Connection',
|
||||||
'driver' => 'Cake\Database\Driver\Mysql',
|
'driver' => 'Cake\Database\Driver\Mysql',
|
||||||
'persistent' => false,
|
'persistent' => false,
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
/**
|
/**
|
||||||
* CakePHP will use the default DB port based on the driver selected
|
* CakePHP will use the default DB port based on the driver selected
|
||||||
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
|
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
|
||||||
* the following line and set the port accordingly
|
* the following line and set the port accordingly
|
||||||
*/
|
*/
|
||||||
//'port' => 'non_standard_port_number',
|
//'port' => 'non_standard_port_number',
|
||||||
'username' => 'root',
|
'username' => 'root',
|
||||||
'password' => 'secret',
|
'password' => 'secret',
|
||||||
'database' => 'my_cake',
|
'database' => 'my_cake',
|
||||||
'encoding' => 'utf8',
|
'encoding' => 'utf8',
|
||||||
'timezone' => 'UTC',
|
'timezone' => 'UTC',
|
||||||
'flags' => [],
|
'flags' => [],
|
||||||
'cacheMetadata' => true,
|
'cacheMetadata' => true,
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
7. DNS record
|
7. DNS record
|
||||||
@ -131,13 +130,12 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/hosts
|
:caption: /etc/hosts
|
||||||
:name: /etc/hosts
|
|
||||||
|
|
||||||
127.0.0.1 my-cake.loc
|
127.0.0.1 my-cake.loc
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
||||||
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
8. Open your browser
|
8. Open your browser
|
||||||
|
@ -48,7 +48,7 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-ci
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-ci
|
||||||
|
|
||||||
|
|
||||||
3. Download CodeIgniter
|
3. Download CodeIgniter
|
||||||
@ -66,13 +66,13 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ cd my-ci
|
devilbox@php-7.0.20 in /shared/httpd $ cd my-ci
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-ci $ wget https://github.com/bcit-ci/CodeIgniter/archive/3.1.8.tar.gz
|
devilbox@php-7.0.20 in /shared/httpd/my-ci $ wget https://github.com/bcit-ci/CodeIgniter/archive/3.1.8.tar.gz
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-ci $ tar xfvz 3.1.8.tar.gz
|
devilbox@php-7.0.20 in /shared/httpd/my-ci $ tar xfvz 3.1.8.tar.gz
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-ci $ ls -l
|
devilbox@php-7.0.20 in /shared/httpd/my-ci $ ls -l
|
||||||
total 7488
|
total 7488
|
||||||
drwxr-xr-x 5 devilbox devilbox 4096 Mar 22 15:48 CodeIgniter-3.1.8/
|
drwxr-xr-x 5 devilbox devilbox 4096 Mar 22 15:48 CodeIgniter-3.1.8/
|
||||||
-rw-r--r-- 1 devilbox devilbox 2205672 May 21 10:42 3.1.8.tar.gz
|
-rw-r--r-- 1 devilbox devilbox 2205672 May 21 10:42 3.1.8.tar.gz
|
||||||
|
|
||||||
|
|
||||||
4. Symlink webroot
|
4. Symlink webroot
|
||||||
@ -80,7 +80,7 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-ci $ ln -s CodeIgniter-3.1.8/ htdocs
|
devilbox@php-7.0.20 in /shared/httpd/my-ci $ ln -s CodeIgniter-3.1.8/ htdocs
|
||||||
|
|
||||||
|
|
||||||
5. Add MySQL Database
|
5. Add MySQL Database
|
||||||
@ -88,7 +88,7 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-ci $ mysql -u root -h 127.0.0.1 -p -e 'CREATE DATABASE my_ci;'
|
devilbox@php-7.0.20 in /shared/httpd/my-ci $ mysql -u root -h 127.0.0.1 -p -e 'CREATE DATABASE my_ci;'
|
||||||
|
|
||||||
|
|
||||||
6. Configure database connection
|
6. Configure database connection
|
||||||
@ -96,35 +96,34 @@ It will be ready in eight simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-ci $ vi htdocs/application/config/database.php
|
devilbox@php-7.0.20 in /shared/httpd/my-ci $ vi htdocs/application/config/database.php
|
||||||
|
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
:caption: htdocs/application/config/database.php
|
:caption: htdocs/application/config/database.php
|
||||||
:name: htdocs/application/config/database.php
|
|
||||||
:emphasize-lines: 4-7
|
:emphasize-lines: 4-7
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$db['default'] = array(
|
$db['default'] = array(
|
||||||
'dsn' => '',
|
'dsn' => '',
|
||||||
'hostname' => '127.0.0.1',
|
'hostname' => '127.0.0.1',
|
||||||
'username' => 'root',
|
'username' => 'root',
|
||||||
'password' => '',
|
'password' => '',
|
||||||
'database' => 'my_ci',
|
'database' => 'my_ci',
|
||||||
'dbdriver' => 'mysqli',
|
'dbdriver' => 'mysqli',
|
||||||
'dbprefix' => '',
|
'dbprefix' => '',
|
||||||
'pconnect' => FALSE,
|
'pconnect' => FALSE,
|
||||||
'db_debug' => (ENVIRONMENT !== 'production'),
|
'db_debug' => (ENVIRONMENT !== 'production'),
|
||||||
'cache_on' => FALSE,
|
'cache_on' => FALSE,
|
||||||
'cachedir' => '',
|
'cachedir' => '',
|
||||||
'char_set' => 'utf8',
|
'char_set' => 'utf8',
|
||||||
'dbcollat' => 'utf8_general_ci',
|
'dbcollat' => 'utf8_general_ci',
|
||||||
'swap_pre' => '',
|
'swap_pre' => '',
|
||||||
'encrypt' => FALSE,
|
'encrypt' => FALSE,
|
||||||
'compress' => FALSE,
|
'compress' => FALSE,
|
||||||
'stricton' => FALSE,
|
'stricton' => FALSE,
|
||||||
'failover' => array(),
|
'failover' => array(),
|
||||||
'save_queries' => TRUE
|
'save_queries' => TRUE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
7. DNS record
|
7. DNS record
|
||||||
@ -136,13 +135,12 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/hosts
|
:caption: /etc/hosts
|
||||||
:name: /etc/hosts
|
|
||||||
|
|
||||||
127.0.0.1 my-ci.loc
|
127.0.0.1 my-ci.loc
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
||||||
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
8. Open your browser
|
8. Open your browser
|
||||||
|
@ -47,7 +47,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-drupal
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-drupal
|
||||||
|
|
||||||
|
|
||||||
3. Install Drupal
|
3. Install Drupal
|
||||||
@ -65,8 +65,8 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ cd my-drupal
|
devilbox@php-7.0.20 in /shared/httpd $ cd my-drupal
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-drupal $ drush dl drupal
|
devilbox@php-7.0.20 in /shared/httpd/my-drupal $ drush dl drupal
|
||||||
|
|
||||||
|
|
||||||
4. Symlink webroot
|
4. Symlink webroot
|
||||||
@ -74,7 +74,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-drupal $ ln -s drupal-8.3.3/ htdocs
|
devilbox@php-7.0.20 in /shared/httpd/my-drupal $ ln -s drupal-8.3.3/ htdocs
|
||||||
|
|
||||||
|
|
||||||
5. DNS record
|
5. DNS record
|
||||||
@ -86,13 +86,12 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/hosts
|
:caption: /etc/hosts
|
||||||
:name: /etc/hosts
|
|
||||||
|
|
||||||
127.0.0.1 my-drupal.loc
|
127.0.0.1 my-drupal.loc
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
||||||
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
6. Open your browser
|
6. Open your browser
|
||||||
@ -101,4 +100,4 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
Open your browser at http://my-drupal.loc and follow the Drupal installation steps.
|
Open your browser at http://my-drupal.loc and follow the Drupal installation steps.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
When asked about MySQL hostname, choose ``127.0.0.1``.
|
When asked about MySQL hostname, choose ``127.0.0.1``.
|
||||||
|
@ -47,7 +47,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-joomla
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-joomla
|
||||||
|
|
||||||
|
|
||||||
3. Download and extract Joomla
|
3. Download and extract Joomla
|
||||||
@ -65,10 +65,10 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ cd my-joomla
|
devilbox@php-7.0.20 in /shared/httpd $ cd my-joomla
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-joomla $ wget -O joomla.tar.gz https://downloads.joomla.org/cms/joomla3/3-8-0/joomla_3-8-0-stable-full_package-tar-gz?format=gz
|
devilbox@php-7.0.20 in /shared/httpd/my-joomla $ wget -O joomla.tar.gz https://downloads.joomla.org/cms/joomla3/3-8-0/joomla_3-8-0-stable-full_package-tar-gz?format=gz
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir joomla
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir joomla
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ tar xvfz joomla.tar.gz -C joomla/
|
devilbox@php-7.0.20 in /shared/httpd $ tar xvfz joomla.tar.gz -C joomla/
|
||||||
|
|
||||||
|
|
||||||
4. Symlink webroot
|
4. Symlink webroot
|
||||||
@ -76,7 +76,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-joomla $ ln -s joomla/ htdocs
|
devilbox@php-7.0.20 in /shared/httpd/my-joomla $ ln -s joomla/ htdocs
|
||||||
|
|
||||||
|
|
||||||
5. DNS record
|
5. DNS record
|
||||||
@ -88,13 +88,12 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/hosts
|
:caption: /etc/hosts
|
||||||
:name: /etc/hosts
|
|
||||||
|
|
||||||
127.0.0.1 my-joomla.loc
|
127.0.0.1 my-joomla.loc
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
||||||
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
6. Open your browser
|
6. Open your browser
|
||||||
|
@ -47,7 +47,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-laravel
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-laravel
|
||||||
|
|
||||||
|
|
||||||
3. Install Laravel
|
3. Install Laravel
|
||||||
@ -65,8 +65,8 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ cd my-laravel
|
devilbox@php-7.0.20 in /shared/httpd $ cd my-laravel
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-laravel $ laravel new laravel-project
|
devilbox@php-7.0.20 in /shared/httpd/my-laravel $ laravel new laravel-project
|
||||||
|
|
||||||
|
|
||||||
4. Symlink webroot
|
4. Symlink webroot
|
||||||
@ -74,7 +74,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-laravel $ ln -s laravel-project/public/ htdocs
|
devilbox@php-7.0.20 in /shared/httpd/my-laravel $ ln -s laravel-project/public/ htdocs
|
||||||
|
|
||||||
|
|
||||||
5. DNS record
|
5. DNS record
|
||||||
@ -86,13 +86,12 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/hosts
|
:caption: /etc/hosts
|
||||||
:name: /etc/hosts
|
|
||||||
|
|
||||||
127.0.0.1 my-laravel.loc
|
127.0.0.1 my-laravel.loc
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
||||||
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
6. Open your browser
|
6. Open your browser
|
||||||
|
@ -47,7 +47,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-phalcon
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-phalcon
|
||||||
|
|
||||||
|
|
||||||
3. Install Phalcon
|
3. Install Phalcon
|
||||||
@ -65,8 +65,8 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ cd my-phalcon
|
devilbox@php-7.0.20 in /shared/httpd $ cd my-phalcon
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-phalcon $ phalcon project phalconphp
|
devilbox@php-7.0.20 in /shared/httpd/my-phalcon $ phalcon project phalconphp
|
||||||
|
|
||||||
|
|
||||||
4. Symlink webroot
|
4. Symlink webroot
|
||||||
@ -74,7 +74,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-phalcon $ ln -s phalconphp/public/ htdocs
|
devilbox@php-7.0.20 in /shared/httpd/my-phalcon $ ln -s phalconphp/public/ htdocs
|
||||||
|
|
||||||
|
|
||||||
5. DNS record
|
5. DNS record
|
||||||
@ -86,13 +86,12 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/hosts
|
:caption: /etc/hosts
|
||||||
:name: /etc/hosts
|
|
||||||
|
|
||||||
127.0.0.1 my-phalcon.loc
|
127.0.0.1 my-phalcon.loc
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
||||||
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
6. Open your browser
|
6. Open your browser
|
||||||
|
@ -49,7 +49,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-photon
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-photon
|
||||||
|
|
||||||
|
|
||||||
3. Install Photon
|
3. Install Photon
|
||||||
@ -72,11 +72,11 @@ itself beforehand.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ cd my-photon
|
devilbox@php-7.0.20 in /shared/httpd $ cd my-photon
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-photon $ photon new blog
|
devilbox@php-7.0.20 in /shared/httpd/my-photon $ photon new blog
|
||||||
...What is your mysql hostname? [localhost] 127.0.0.1
|
...What is your mysql hostname? [localhost] 127.0.0.1
|
||||||
...What is your mysql username? [root]root
|
...What is your mysql username? [root]root
|
||||||
...What is your mysql password? []
|
...What is your mysql password? []
|
||||||
|
|
||||||
|
|
||||||
4. Symlink webroot
|
4. Symlink webroot
|
||||||
@ -84,7 +84,7 @@ itself beforehand.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-photon $ ln -s blog/public/ htdocs
|
devilbox@php-7.0.20 in /shared/httpd/my-photon $ ln -s blog/public/ htdocs
|
||||||
|
|
||||||
|
|
||||||
5. DNS record
|
5. DNS record
|
||||||
@ -96,13 +96,12 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/hosts
|
:caption: /etc/hosts
|
||||||
:name: /etc/hosts
|
|
||||||
|
|
||||||
127.0.0.1 my-photon.loc
|
127.0.0.1 my-photon.loc
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
||||||
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
6. Open your browser
|
6. Open your browser
|
||||||
|
@ -48,7 +48,7 @@ It will be ready in seven simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ It will be ready in seven simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-symfony
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-symfony
|
||||||
|
|
||||||
|
|
||||||
3. Install Symfony
|
3. Install Symfony
|
||||||
@ -66,8 +66,8 @@ It will be ready in seven simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ cd my-symfony
|
devilbox@php-7.0.20 in /shared/httpd $ cd my-symfony
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-symfony $ symfony new symfony
|
devilbox@php-7.0.20 in /shared/httpd/my-symfony $ symfony new symfony
|
||||||
|
|
||||||
|
|
||||||
4. Symlink webroot
|
4. Symlink webroot
|
||||||
@ -75,7 +75,7 @@ It will be ready in seven simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-symfony $ ln -s symfony/web/ htdocs
|
devilbox@php-7.0.20 in /shared/httpd/my-symfony $ ln -s symfony/web/ htdocs
|
||||||
|
|
||||||
|
|
||||||
5. Enable Symfony prod (``app.php``)
|
5. Enable Symfony prod (``app.php``)
|
||||||
@ -83,8 +83,8 @@ It will be ready in seven simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-symfony $ cd symfony/web
|
devilbox@php-7.0.20 in /shared/httpd/my-symfony $ cd symfony/web
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-symfony/symfony/web $ ln -s app.php index.php
|
devilbox@php-7.0.20 in /shared/httpd/my-symfony/symfony/web $ ln -s app.php index.php
|
||||||
|
|
||||||
|
|
||||||
6. DNS record
|
6. DNS record
|
||||||
@ -96,13 +96,12 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/hosts
|
:caption: /etc/hosts
|
||||||
:name: /etc/hosts
|
|
||||||
|
|
||||||
127.0.0.1 my-symfony.loc
|
127.0.0.1 my-symfony.loc
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
||||||
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
7. Open your browser
|
7. Open your browser
|
||||||
|
@ -47,7 +47,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-wp
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-wp
|
||||||
|
|
||||||
|
|
||||||
3. Download Wordpress via ``git``
|
3. Download Wordpress via ``git``
|
||||||
@ -65,8 +65,8 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ cd my-wp
|
devilbox@php-7.0.20 in /shared/httpd $ cd my-wp
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-wp $ git clone https://github.com/WordPress/WordPress wordpress.git
|
devilbox@php-7.0.20 in /shared/httpd/my-wp $ git clone https://github.com/WordPress/WordPress wordpress.git
|
||||||
|
|
||||||
|
|
||||||
4. Symlink webroot
|
4. Symlink webroot
|
||||||
@ -74,7 +74,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-wp $ ln -s wordpress.git/ htdocs
|
devilbox@php-7.0.20 in /shared/httpd/my-wp $ ln -s wordpress.git/ htdocs
|
||||||
|
|
||||||
|
|
||||||
5. DNS record
|
5. DNS record
|
||||||
@ -86,13 +86,12 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/hosts
|
:caption: /etc/hosts
|
||||||
:name: /etc/hosts
|
|
||||||
|
|
||||||
127.0.0.1 my-wp.loc
|
127.0.0.1 my-wp.loc
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
||||||
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
6. Open your browser
|
6. Open your browser
|
||||||
|
@ -47,7 +47,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-yii
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-yii
|
||||||
|
|
||||||
|
|
||||||
3. Install Yii2 via ``composer``
|
3. Install Yii2 via ``composer``
|
||||||
@ -65,8 +65,8 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ cd my-yii
|
devilbox@php-7.0.20 in /shared/httpd $ cd my-yii
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-yii $ composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic yii2-dev
|
devilbox@php-7.0.20 in /shared/httpd/my-yii $ composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic yii2-dev
|
||||||
|
|
||||||
|
|
||||||
4. Symlink webroot
|
4. Symlink webroot
|
||||||
@ -74,7 +74,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-yii $ ln -s yii2-dev/web/ htdocs
|
devilbox@php-7.0.20 in /shared/httpd/my-yii $ ln -s yii2-dev/web/ htdocs
|
||||||
|
|
||||||
|
|
||||||
5. DNS record
|
5. DNS record
|
||||||
@ -86,13 +86,12 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/hosts
|
:caption: /etc/hosts
|
||||||
:name: /etc/hosts
|
|
||||||
|
|
||||||
127.0.0.1 my-yii.loc
|
127.0.0.1 my-yii.loc
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
||||||
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
6. Open your browser
|
6. Open your browser
|
||||||
|
@ -47,7 +47,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-zend
|
devilbox@php-7.0.20 in /shared/httpd $ mkdir my-zend
|
||||||
|
|
||||||
|
|
||||||
3. Install Zend via ``composer``
|
3. Install Zend via ``composer``
|
||||||
@ -65,8 +65,8 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd $ cd my-zend
|
devilbox@php-7.0.20 in /shared/httpd $ cd my-zend
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-zend $ composer create-project --prefer-dist zendframework/skeleton-application zend
|
devilbox@php-7.0.20 in /shared/httpd/my-zend $ composer create-project --prefer-dist zendframework/skeleton-application zend
|
||||||
|
|
||||||
|
|
||||||
4. Symlink webroot
|
4. Symlink webroot
|
||||||
@ -74,7 +74,7 @@ It will be ready in six simple steps:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
devilbox@php-7.0.20 in /shared/httpd/my-zend $ ln -s zend/public/ htdocs
|
devilbox@php-7.0.20 in /shared/httpd/my-zend $ ln -s zend/public/ htdocs
|
||||||
|
|
||||||
|
|
||||||
5. DNS record
|
5. DNS record
|
||||||
@ -86,13 +86,12 @@ following line to your host operating systems ``/etc/hosts`` file
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: /etc/hosts
|
:caption: /etc/hosts
|
||||||
:name: /etc/hosts
|
|
||||||
|
|
||||||
127.0.0.1 my-zend.loc
|
127.0.0.1 my-zend.loc
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
For in-depth info about adding DNS records on Linux, Windows or MacOS see:
|
||||||
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
:ref:`project_configuration_dns_records` or :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
6. Open your browser
|
6. Open your browser
|
||||||
|
@ -36,20 +36,19 @@ All you have to to is to adjust the path of :ref:`env_httpd_datadir` in the ``.e
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to Devilbox git directory
|
# Navigate to Devilbox git directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Open the .env file with your favourite editor
|
# Open the .env file with your favourite editor
|
||||||
host> vim .env
|
host> vim .env
|
||||||
|
|
||||||
Now Adjust the value of :ref:`env_httpd_datadir`
|
Now Adjust the value of :ref:`env_httpd_datadir`
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
:caption: .env
|
||||||
:caption: .env
|
:emphasize-lines: 1
|
||||||
:emphasize-lines: 1
|
|
||||||
|
|
||||||
HOST_PATH_HTTPD_DATADIR=/home/user/workspace/web
|
HOST_PATH_HTTPD_DATADIR=/home/user/workspace/web
|
||||||
|
|
||||||
That's it, whenever you start up the Devilbox ``/home/user/workspace/web/`` will be mounted into
|
That's it, whenever you start up the Devilbox ``/home/user/workspace/web/`` will be mounted into
|
||||||
the PHP and the web server container into ``/shared/httpd/``.
|
the PHP and the web server container into ``/shared/httpd/``.
|
||||||
@ -70,20 +69,19 @@ All you have to to is to adjust the path of :ref:`env_mysql_datadir` in the ``.e
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to Devilbox git directory
|
# Navigate to Devilbox git directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Open the .env file with your favourite editor
|
# Open the .env file with your favourite editor
|
||||||
host> vim .env
|
host> vim .env
|
||||||
|
|
||||||
Now Adjust the value of :ref:`env_mysql_datadir`
|
Now Adjust the value of :ref:`env_mysql_datadir`
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
:caption: .env
|
||||||
:caption: .env
|
:emphasize-lines: 1
|
||||||
:emphasize-lines: 1
|
|
||||||
|
|
||||||
HOST_PATH_MYSQL_DATADIR=/home/user/workspace/db/mysql
|
HOST_PATH_MYSQL_DATADIR=/home/user/workspace/db/mysql
|
||||||
|
|
||||||
That's it, whenever you start up the Devilbox ``/home/user/workspace/db/mysql/`` will be mounted
|
That's it, whenever you start up the Devilbox ``/home/user/workspace/db/mysql/`` will be mounted
|
||||||
into the MySQL container.
|
into the MySQL container.
|
||||||
@ -95,20 +93,19 @@ All you have to to is to adjust the path of :ref:`env_pgsql_datadir` in the ``.e
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to Devilbox git directory
|
# Navigate to Devilbox git directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Open the .env file with your favourite editor
|
# Open the .env file with your favourite editor
|
||||||
host> vim .env
|
host> vim .env
|
||||||
|
|
||||||
Now Adjust the value of :ref:`env_pgsql_datadir`
|
Now Adjust the value of :ref:`env_pgsql_datadir`
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
:caption: .env
|
||||||
:caption: .env
|
:emphasize-lines: 1
|
||||||
:emphasize-lines: 1
|
|
||||||
|
|
||||||
HOST_PATH_PGSQL_DATADIR=/home/user/workspace/db/pgsql
|
HOST_PATH_PGSQL_DATADIR=/home/user/workspace/db/pgsql
|
||||||
|
|
||||||
That's it, whenever you start up the Devilbox ``/home/user/workspace/db/pqsql/`` will be mounted
|
That's it, whenever you start up the Devilbox ``/home/user/workspace/db/pqsql/`` will be mounted
|
||||||
into the PostgreSQL container.
|
into the PostgreSQL container.
|
||||||
@ -120,20 +117,19 @@ All you have to to is to adjust the path of :ref:`env_mongo_datadir` in the ``.e
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to Devilbox git directory
|
# Navigate to Devilbox git directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Open the .env file with your favourite editor
|
# Open the .env file with your favourite editor
|
||||||
host> vim .env
|
host> vim .env
|
||||||
|
|
||||||
Now Adjust the value of :ref:`env_mongo_datadir`
|
Now Adjust the value of :ref:`env_mongo_datadir`
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
:caption: .env
|
||||||
:caption: .env
|
:emphasize-lines: 1
|
||||||
:emphasize-lines: 1
|
|
||||||
|
|
||||||
HOST_PATH_MONGO_DATADIR=/home/user/workspace/db/mongo
|
HOST_PATH_MONGO_DATADIR=/home/user/workspace/db/mongo
|
||||||
|
|
||||||
That's it, whenever you start up the Devilbox ``/home/user/workspace/db/mongo/`` will be mounted
|
That's it, whenever you start up the Devilbox ``/home/user/workspace/db/mongo/`` will be mounted
|
||||||
into the MongoDB container.
|
into the MongoDB container.
|
||||||
@ -189,8 +185,8 @@ This allows you to keep your project configuration unchanged and have the same b
|
|||||||
PHP container and on your host operating system.
|
PHP container and on your host operating system.
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
Do not mix up ``localhost`` with ``127.0.0.1``. They behave differently!
|
Do not mix up ``localhost`` with ``127.0.0.1``. They behave differently!
|
||||||
Use ``127.0.0.1`` and do not use ``localhost``.
|
Use ``127.0.0.1`` and do not use ``localhost``.
|
||||||
|
|
||||||
As an example, if you want to access the MySQL database from within the PHP container, you do the
|
As an example, if you want to access the MySQL database from within the PHP container, you do the
|
||||||
following:
|
following:
|
||||||
@ -198,24 +194,24 @@ following:
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 8
|
:emphasize-lines: 8
|
||||||
|
|
||||||
# Navigate to Devilbox git directory
|
# Navigate to Devilbox git directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Enter the PHP container
|
# Enter the PHP container
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
# Enter the MySQL console
|
# Enter the MySQL console
|
||||||
php> mysql -u root -h 127.0.0.1 -p
|
php> mysql -u root -h 127.0.0.1 -p
|
||||||
mysql>
|
mysql>
|
||||||
|
|
||||||
The very same command applies to access the MySQL database from your host operating system:
|
The very same command applies to access the MySQL database from your host operating system:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
# Enter the MySQL console
|
# Enter the MySQL console
|
||||||
host> mysql -u root -h 127.0.0.1 -p
|
host> mysql -u root -h 127.0.0.1 -p
|
||||||
mysql>
|
mysql>
|
||||||
|
|
||||||
So no matter if you use the Devilbox or have another LAMP stack installed locally on your host
|
So no matter if you use the Devilbox or have another LAMP stack installed locally on your host
|
||||||
operating system, you do not have to change your configuration files if you stick to this tip.
|
operating system, you do not have to change your configuration files if you stick to this tip.
|
||||||
@ -225,13 +221,13 @@ or IP address of the MySQL server to ``127.0.0.1``:
|
|||||||
|
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// MySQL server connection in your project configuration
|
// MySQL server connection in your project configuration
|
||||||
mysql_host = '127.0.0.1';
|
mysql_host = '127.0.0.1';
|
||||||
mysql_port = '3306';
|
mysql_port = '3306';
|
||||||
mysql_user = 'someusername';
|
mysql_user = 'someusername';
|
||||||
mysql_pass = 'somepassword';
|
mysql_pass = 'somepassword';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
.. seealso:: :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
|
@ -5,13 +5,12 @@ Create your first project
|
|||||||
*************************
|
*************************
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
Ensure you have read :ref:`getting_started_directory_overview` to understand what is
|
Ensure you have read :ref:`getting_started_directory_overview` to understand what is
|
||||||
going on under the hood.
|
going on under the hood.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
This section not only applies for one project, it applied for as many projects as you need.
|
||||||
This section not only applies for one project, it applied for as many projects as you need.
|
**There is no limit in the number of projects.**
|
||||||
**There is no limit in the number of projects.**
|
|
||||||
|
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
@ -35,8 +34,8 @@ Step 2: create a project directory
|
|||||||
In your Devilbox git directory, navigate to ``./data/www`` and create a new directory.
|
In your Devilbox git directory, navigate to ``./data/www`` and create a new directory.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Choose the directory name wisely, as it will be part of the domain for that project.
|
Choose the directory name wisely, as it will be part of the domain for that project.
|
||||||
For this example we will use ``project-1`` as our project name.
|
For this example we will use ``project-1`` as our project name.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
@ -62,7 +61,7 @@ Step 3: create a docroot directory
|
|||||||
==================================
|
==================================
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
As desribed in :ref:`getting_started_directory_overview_docroot` the docroot directory name must be ``htdocs`` for now.
|
As desribed in :ref:`getting_started_directory_overview_docroot` the docroot directory name must be ``htdocs`` for now.
|
||||||
|
|
||||||
Navigate to your newly created project directory and create a directory named `htdocs` inside it.
|
Navigate to your newly created project directory and create a directory named `htdocs` inside it.
|
||||||
|
|
||||||
@ -88,7 +87,7 @@ By having created the docroot directory, the web server is now able to serve you
|
|||||||
The intranet already gives you the exact string that you can simply copy into your ``/etc/hosts`` file on your host operating system to solve this issue.
|
The intranet already gives you the exact string that you can simply copy into your ``/etc/hosts`` file on your host operating system to solve this issue.
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
This will only work on **native Docker** for Linux or MacOS. Read up on the next section to also find out how to do that on **Docker Toolbox** and Windows.
|
This will only work on **native Docker** for Linux or MacOS. Read up on the next section to also find out how to do that on **Docker Toolbox** and Windows.
|
||||||
|
|
||||||
|
|
||||||
.. _getting_started_create_your_first_project_dns_entry:
|
.. _getting_started_create_your_first_project_dns_entry:
|
||||||
@ -97,9 +96,9 @@ Step 4: create a DNS entry
|
|||||||
==========================
|
==========================
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
This step can also be automated via the bundled DNS server to automatically provide catch-all
|
This step can also be automated via the bundled DNS server to automatically provide catch-all
|
||||||
DNS entries to your host computer, but is outside the scope of this
|
DNS entries to your host computer, but is outside the scope of this
|
||||||
*getting started tutorial*.
|
*getting started tutorial*.
|
||||||
|
|
||||||
Add DNS for Linux and MacOS (native Docker)
|
Add DNS for Linux and MacOS (native Docker)
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
@ -109,11 +108,11 @@ you the exact string you need to paste into your ``/etc/hosts`` file on your hos
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Open your /etc/hosts file with sudo or root privileges
|
# Open your /etc/hosts file with sudo or root privileges
|
||||||
# and add the following DNS entry
|
# and add the following DNS entry
|
||||||
host> sudo vi /etc/hosts
|
host> sudo vi /etc/hosts
|
||||||
|
|
||||||
127.0.0.1 project-1.loc
|
127.0.0.1 project-1.loc
|
||||||
|
|
||||||
Add DNS for Windows (native Docker)
|
Add DNS for Windows (native Docker)
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
@ -125,7 +124,7 @@ Open ``C:\Windows\System32\drivers\etc`` with admistrative privileges and add th
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
127.0.0.1 project-1.loc
|
127.0.0.1 project-1.loc
|
||||||
|
|
||||||
Add DNS for Docker Toolbox
|
Add DNS for Docker Toolbox
|
||||||
--------------------------
|
--------------------------
|
||||||
@ -144,9 +143,9 @@ have to add instead on your host operating system is:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> sudo vi /etc/hosts
|
host> sudo vi /etc/hosts
|
||||||
|
|
||||||
192.16.0.1 project-1.loc
|
192.16.0.1 project-1.loc
|
||||||
|
|
||||||
**Docker Toolbox on Windows**
|
**Docker Toolbox on Windows**
|
||||||
|
|
||||||
@ -154,7 +153,7 @@ Open ``C:\Windows\System32\drivers\etc`` with admistrative privileges and add th
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
192.16.0.1 project-1.loc
|
192.16.0.1 project-1.loc
|
||||||
|
|
||||||
Back to intranet
|
Back to intranet
|
||||||
----------------
|
----------------
|
||||||
|
@ -12,8 +12,8 @@ The only thing you might need to install on your host operating system is your f
|
|||||||
editor to actually start coding.
|
editor to actually start coding.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
If you want to find out what tools are available inside the PHP container, visit the
|
If you want to find out what tools are available inside the PHP container, visit the
|
||||||
following section: :ref:`available_tools`.
|
following section: :ref:`available_tools`.
|
||||||
|
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
@ -25,7 +25,7 @@ How to enter
|
|||||||
============
|
============
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
You can only enter the PHP container if it is running.
|
You can only enter the PHP container if it is running.
|
||||||
|
|
||||||
|
|
||||||
Linux and MacOS
|
Linux and MacOS
|
||||||
@ -51,11 +51,11 @@ Just run it and it will enter you into the PHP container and bring you to ``/sha
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Execute on the host operating system
|
# Execute on the host operating system
|
||||||
C:/Users/user1/devilbox> shell.bat
|
C:/Users/user1/devilbox> shell.bat
|
||||||
|
|
||||||
# Now you are inside the PHP Linux container
|
# Now you are inside the PHP Linux container
|
||||||
devilbox@php-7.0.19 in /shared/httpd $
|
devilbox@php-7.0.19 in /shared/httpd $
|
||||||
|
|
||||||
|
|
||||||
How to become root
|
How to become root
|
||||||
@ -67,16 +67,16 @@ the password-less ``sudo``.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Inside the PHP Linux container as user devilbox
|
# Inside the PHP Linux container as user devilbox
|
||||||
devilbox@php-7.0.19 in /shared/httpd $ sudo su -
|
devilbox@php-7.0.19 in /shared/httpd $ sudo su -
|
||||||
|
|
||||||
# Now you are root and can do anything you want
|
# Now you are root and can do anything you want
|
||||||
root@php-7.0.19 in /shared/httpd $
|
root@php-7.0.19 in /shared/httpd $
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
As this action is inside a Docker container, there is no difference between Linux, MacOS or
|
As this action is inside a Docker container, there is no difference between Linux, MacOS or
|
||||||
Windows. Every host operating system is using the same Docker container - equal accross all
|
Windows. Every host operating system is using the same Docker container - equal accross all
|
||||||
platforms.
|
platforms.
|
||||||
|
|
||||||
|
|
||||||
Tools
|
Tools
|
||||||
|
@ -45,9 +45,9 @@ Additionally you will require ``git`` in order to clone the devilbox project.
|
|||||||
Docker Toolbox (e.g. for Windows 7 or older Macs) read up on this section.
|
Docker Toolbox (e.g. for Windows 7 or older Macs) read up on this section.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Docker itself requires super user privileges which is granted to a system wide group
|
Docker itself requires super user privileges which is granted to a system wide group
|
||||||
called ``docker``. After having installed Docker on your system, ensure that your local
|
called ``docker``. After having installed Docker on your system, ensure that your local
|
||||||
user is assigned to the ``docker`` group. Check this via ``groups`` or ``id`` command.
|
user is assigned to the ``docker`` group. Check this via ``groups`` or ``id`` command.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
:ref:`install_docker`
|
:ref:`install_docker`
|
||||||
@ -84,10 +84,10 @@ this specific git tag.
|
|||||||
|
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Whenever you check out a different version, make sure that your ``.env`` file is up-to-date
|
Whenever you check out a different version, make sure that your ``.env`` file is up-to-date
|
||||||
with the bundled ``env-example`` file. Different Devilbox releases might require different
|
with the bundled ``env-example`` file. Different Devilbox releases might require different
|
||||||
settings to be available inside the ``.env`` file. Refer to the next section for how to
|
settings to be available inside the ``.env`` file. Refer to the next section for how to
|
||||||
create the ``.env`` file.
|
create the ``.env`` file.
|
||||||
|
|
||||||
|
|
||||||
Create ``.env`` file
|
Create ``.env`` file
|
||||||
@ -145,7 +145,6 @@ Open the ``.env`` file with your favorite text editor and adjust those values:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 3,4
|
:emphasize-lines: 3,4
|
||||||
|
|
||||||
host> vi .env
|
host> vi .env
|
||||||
@ -154,7 +153,7 @@ Open the ``.env`` file with your favorite text editor and adjust those values:
|
|||||||
NEW_GID=1002
|
NEW_GID=1002
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Make sure that you use the values provided by ``id -u`` and ``id -g``.
|
Make sure that you use the values provided by ``id -u`` and ``id -g``.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
:ref:`syncronize_container_permissions`
|
:ref:`syncronize_container_permissions`
|
||||||
|
@ -24,29 +24,29 @@ The log directory structure would look something like this:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> tree log
|
host> tree log
|
||||||
|
|
||||||
log/
|
log/
|
||||||
├── nginx-stable/
|
├── nginx-stable/
|
||||||
│ ├── nginx-stable/
|
│ ├── nginx-stable/
|
||||||
│ ├── defaultlocalhost-access.log
|
│ ├── defaultlocalhost-access.log
|
||||||
│ ├── defaultlocalhost-error.log
|
│ ├── defaultlocalhost-error.log
|
||||||
│ ├── <project-name>-access.log # Each project has its own access log
|
│ ├── <project-name>-access.log # Each project has its own access log
|
||||||
│ ├── <project-name>-error.log # Each project has its own error log
|
│ ├── <project-name>-error.log # Each project has its own error log
|
||||||
├── mariadb-10.1/
|
├── mariadb-10.1/
|
||||||
│ ├── error.log
|
│ ├── error.log
|
||||||
│ ├── query.log
|
│ ├── query.log
|
||||||
│ ├── slow.log
|
│ ├── slow.log
|
||||||
├── php-fpm-7.1/
|
├── php-fpm-7.1/
|
||||||
│ ├── php-fpm.access
|
│ ├── php-fpm.access
|
||||||
│ ├── php-fpm.error
|
│ ├── php-fpm.error
|
||||||
|
|
||||||
Use your favorite tools to view log files such as ``tail``, ``less``, ``more``, ``cat`` or others.
|
Use your favorite tools to view log files such as ``tail``, ``less``, ``more``, ``cat`` or others.
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
Currently logs are only mounted for PHP, HTTPD and MYSQL container.
|
Currently logs are only mounted for PHP, HTTPD and MYSQL container.
|
||||||
All other services will log to Docker logs.
|
All other services will log to Docker logs.
|
||||||
|
|
||||||
|
|
||||||
Docker logs
|
Docker logs
|
||||||
@ -59,31 +59,31 @@ When using this approach, you need to use the ``docker-compose logs`` command to
|
|||||||
files from within the Devilbox git directory.
|
files from within the Devilbox git directory.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> docker-compose logs
|
host> docker-compose logs
|
||||||
|
|
||||||
When you want to continuously watch the log output (such as ``tail -f``), you need to append ``-f``
|
When you want to continuously watch the log output (such as ``tail -f``), you need to append ``-f``
|
||||||
to the command.
|
to the command.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> docker-compose logs -f
|
host> docker-compose logs -f
|
||||||
|
|
||||||
When you only want to have logs displayed for a single service, you can also append the service
|
When you only want to have logs displayed for a single service, you can also append the service
|
||||||
name (works with or without ``-f`` as well):
|
name (works with or without ``-f`` as well):
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> docker-compose logs php -f
|
host> docker-compose logs php -f
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
This currently does not work for the MySQL container, which will always log to file.
|
This currently does not work for the MySQL container, which will always log to file.
|
||||||
|
|
||||||
|
|
||||||
Checklist
|
Checklist
|
||||||
|
@ -109,10 +109,10 @@ If you share your projects over a LAN, but do not want anybody to view the Devil
|
|||||||
you can also password protect it.
|
you can also password protect it.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
In order to do so, have a look at the following ``.env`` variables:
|
In order to do so, have a look at the following ``.env`` variables:
|
||||||
|
|
||||||
* :ref:`env_devilbox_ui_protect`
|
* :ref:`env_devilbox_ui_protect`
|
||||||
* :ref:`env_devilbox_ui_password`
|
* :ref:`env_devilbox_ui_password`
|
||||||
|
|
||||||
|
|
||||||
Disable the intranet
|
Disable the intranet
|
||||||
@ -123,9 +123,9 @@ This is achieved internally by removing the default virtual host which serves th
|
|||||||
When the intranet is disabled, there is no way to access it.
|
When the intranet is disabled, there is no way to access it.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
In order to do so, have a look at the following ``.env`` variable:
|
In order to do so, have a look at the following ``.env`` variable:
|
||||||
|
|
||||||
* :ref:`env_devilbox_ui_enable`
|
* :ref:`env_devilbox_ui_enable`
|
||||||
|
|
||||||
|
|
||||||
Checklist
|
Checklist
|
||||||
|
@ -128,14 +128,14 @@ You first need to find out the image name and then also the currently used image
|
|||||||
|
|
||||||
host> grep 'image:' docker-compose.yml
|
host> grep 'image:' docker-compose.yml
|
||||||
|
|
||||||
image: cytopia/bind:0.11
|
image: cytopia/bind:0.11
|
||||||
image: devilbox/php-fpm:${PHP_SERVER:-7.0}-work
|
image: devilbox/php-fpm:${PHP_SERVER:-7.0}-work
|
||||||
image: devilbox/${HTTPD_SERVER:-nginx-stable}:0.13
|
image: devilbox/${HTTPD_SERVER:-nginx-stable}:0.13
|
||||||
image: cytopia/${MYSQL_SERVER:-mariadb-10.1}:latest
|
image: cytopia/${MYSQL_SERVER:-mariadb-10.1}:latest
|
||||||
image: postgres:${PGSQL_SERVER:-9.6}
|
image: postgres:${PGSQL_SERVER:-9.6}
|
||||||
image: redis:${REDIS_SERVER:-3.2}
|
image: redis:${REDIS_SERVER:-3.2}
|
||||||
image: memcached:${MEMCD_SERVER:-latest}
|
image: memcached:${MEMCD_SERVER:-latest}
|
||||||
image: mongo:${MONGO_SERVER:-latest}
|
image: mongo:${MONGO_SERVER:-latest}
|
||||||
|
|
||||||
After having found the possible candidates, you will still have to find the corresponding value
|
After having found the possible candidates, you will still have to find the corresponding value
|
||||||
inside the ``..env`` file. Let's do it for the PHP image:
|
inside the ``..env`` file. Let's do it for the PHP image:
|
||||||
|
@ -66,7 +66,6 @@ host is ready to be served with your custom domain.
|
|||||||
tutorials/change-container-versions
|
tutorials/change-container-versions
|
||||||
tutorials/work-inside-the-container
|
tutorials/work-inside-the-container
|
||||||
tutorials/enable-xdebug
|
tutorials/enable-xdebug
|
||||||
tutorials/custom-apache-modules
|
|
||||||
tutorials/custom-environment-variables
|
tutorials/custom-environment-variables
|
||||||
tutorials/static-code-analysis
|
tutorials/static-code-analysis
|
||||||
|
|
||||||
@ -94,7 +93,6 @@ host is ready to be served with your custom domain.
|
|||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
configuration-project/dns-records
|
configuration-project/dns-records
|
||||||
configuration-project/domain
|
|
||||||
configuration-project/custom-vhost
|
configuration-project/custom-vhost
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ If you do not port-forward it to your host machines localhost, you will have to
|
|||||||
DNS entries that are described in this documentation to go to ``127.0.0.1`` to the IP address of
|
DNS entries that are described in this documentation to go to ``127.0.0.1`` to the IP address of
|
||||||
your virtual machine.
|
your virtual machine.
|
||||||
|
|
||||||
|
.. _docker_toolbox_auto_dns:
|
||||||
|
|
||||||
Auto-DNS
|
Auto-DNS
|
||||||
--------
|
--------
|
||||||
|
@ -29,14 +29,14 @@ each PHP container and reay to use. To backup all databases follow the below lis
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Enter the PHP container
|
# Enter the PHP container
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
# Run mongodump
|
# Run mongodump
|
||||||
devilbox@php-7.1.6 in /shared/httpd $ mongodump --out /shared/backups/mongo
|
devilbox@php-7.1.6 in /shared/httpd $ mongodump --out /shared/backups/mongo
|
||||||
|
|
||||||
To find out more about the configuration and options of mongodump, visit its project page under:
|
To find out more about the configuration and options of mongodump, visit its project page under:
|
||||||
https://docs.mongodb.com/manual/reference/program/mongodump.
|
https://docs.mongodb.com/manual/reference/program/mongodump.
|
||||||
@ -53,14 +53,14 @@ each PHP container and ready to use. To restore all MongoDB databases follow the
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Enter the PHP container
|
# Enter the PHP container
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
# Start the restore/import from /shared/backups/mongo
|
# Start the restore/import from /shared/backups/mongo
|
||||||
devilbox@php-7.1.6 in /shared/httpd $ mongorestore /shared/backups/mongo
|
devilbox@php-7.1.6 in /shared/httpd $ mongorestore /shared/backups/mongo
|
||||||
|
|
||||||
To find out more about the configuration and options of mongorestore, visit its project page under:
|
To find out more about the configuration and options of mongorestore, visit its project page under:
|
||||||
https://docs.mongodb.com/manual/reference/program/mongorestore/.
|
https://docs.mongodb.com/manual/reference/program/mongorestore/.
|
||||||
|
@ -30,14 +30,14 @@ listed example:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Enter the PHP container
|
# Enter the PHP container
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
# Run pg_dump
|
# Run pg_dump
|
||||||
devilbox@php-7.1.6 in /shared/httpd $ pg_dump -h pgsql -U postgres -W my_db_name > /shared/backups/pgsql/my_db_name.sql
|
devilbox@php-7.1.6 in /shared/httpd $ pg_dump -h pgsql -U postgres -W my_db_name > /shared/backups/pgsql/my_db_name.sql
|
||||||
|
|
||||||
To find out more about the configuration and options of pg_dump, visit its project page under:
|
To find out more about the configuration and options of pg_dump, visit its project page under:
|
||||||
https://www.postgresql.org/docs/current/static/backup-dump.html.
|
https://www.postgresql.org/docs/current/static/backup-dump.html.
|
||||||
@ -67,42 +67,42 @@ Here are a few examples for different file types:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Enter the PHP container
|
# Enter the PHP container
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
# Start the import
|
# Start the import
|
||||||
devilbox@php-7.1.6 in /shared/httpd $ psql -h pgsql -U postgres -W my_db_name < /shared/backups/pgsql/my_db_name.sql
|
devilbox@php-7.1.6 in /shared/httpd $ psql -h pgsql -U postgres -W my_db_name < /shared/backups/pgsql/my_db_name.sql
|
||||||
|
|
||||||
``*.sql.gz`` file
|
``*.sql.gz`` file
|
||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Enter the PHP container
|
# Enter the PHP container
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
# Start the import
|
# Start the import
|
||||||
devilbox@php-7.1.6 in /shared/httpd $ zcat /shared/backups/pgsql/my_db_name.sql.gz | psql -h pgsql -U postgres -W my_db_name
|
devilbox@php-7.1.6 in /shared/httpd $ zcat /shared/backups/pgsql/my_db_name.sql.gz | psql -h pgsql -U postgres -W my_db_name
|
||||||
|
|
||||||
``*.sql.tar.gz`` file
|
``*.sql.tar.gz`` file
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Enter the PHP container
|
# Enter the PHP container
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
# Start the import
|
# Start the import
|
||||||
devilbox@php-7.1.6 in /shared/httpd $ tar xzOf /shared/backups/pgsql/my_db_name.sql.tar.gz | psql -h pgsql -U postgres -W my_db_name
|
devilbox@php-7.1.6 in /shared/httpd $ tar xzOf /shared/backups/pgsql/my_db_name.sql.tar.gz | psql -h pgsql -U postgres -W my_db_name
|
||||||
|
|
||||||
|
|
||||||
Adminer
|
Adminer
|
||||||
|
@ -84,11 +84,11 @@ The PHP container is your workhorse and these are your tools:
|
|||||||
+----------------------+-----------------------------------------------------------------------------------+
|
+----------------------+-----------------------------------------------------------------------------------+
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
If you are in need of other tools, open up an issue at
|
If you are in need of other tools, open up an issue at
|
||||||
`Github <https://github.com/cytopia/devilbox/issues>`_ and ask for it,
|
`Github <https://github.com/cytopia/devilbox/issues>`_ and ask for it,
|
||||||
this can usually be implemented very quickly.
|
this can usually be implemented very quickly.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
If you ever feel those tools are out-dated, simply update your Docker images.
|
If you ever feel those tools are out-dated, simply update your Docker images.
|
||||||
Docker images are built every night to ensure latest tools and security patches:
|
Docker images are built every night to ensure latest tools and security patches:
|
||||||
:ref:`getting_started_update_the_docker_images`
|
:ref:`getting_started_update_the_docker_images`
|
||||||
|
@ -86,5 +86,5 @@ When the PHP-FPM process finally starts up it actually runs with your local syst
|
|||||||
sure permissions will be in sync from now on.
|
sure permissions will be in sync from now on.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
To tackle this on the PHP-FPM side is only half a solution to the problem. The same applies to a web server Docker container when you offer **file uploads**. They will be uploaded and created by the web servers uid/gid. Therefore the web server itself must also provide the same kind of solution.
|
To tackle this on the PHP-FPM side is only half a solution to the problem. The same applies to a web server Docker container when you offer **file uploads**. They will be uploaded and created by the web servers uid/gid. Therefore the web server itself must also provide the same kind of solution.
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ Yes, the ``.env`` variable :ref:`env_tld_suffix` can be changed to whatever doma
|
|||||||
you want. See :ref:`env_tld_suffix`.
|
you want. See :ref:`env_tld_suffix`.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Be aware not to use ``dev`` or ``localhost``. See :ref:`env_tld_suffix` for more details.
|
Be aware not to use ``dev`` or ``localhost``. See :ref:`env_tld_suffix` for more details.
|
||||||
|
|
||||||
|
|
||||||
Can I just start PHP and MySQL instead of all container?
|
Can I just start PHP and MySQL instead of all container?
|
||||||
|
@ -29,12 +29,12 @@ In order to remove the container do the following:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
host> docker-compose stop
|
host> docker-compose stop
|
||||||
|
|
||||||
# Remove the stopped container (IMPORTANT!)
|
# Remove the stopped container (IMPORTANT!)
|
||||||
# After the removal it will be re-created during next run
|
# After the removal it will be re-created during next run
|
||||||
host> docker-compose rm -f
|
host> docker-compose rm -f
|
||||||
|
|
||||||
.. seealso:: :ref:`remove_stopped_container`
|
.. seealso:: :ref:`remove_stopped_container`
|
||||||
|
|
||||||
@ -51,15 +51,15 @@ to read-only by applying the following ``chmod`` command.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Nagivate to devilbox git directory
|
# Nagivate to devilbox git directory
|
||||||
host> cd path/to/devilbox
|
host> cd path/to/devilbox
|
||||||
|
|
||||||
# Navigate to the MySQL config directory (e.g.: MySQL 5.5)
|
# Navigate to the MySQL config directory (e.g.: MySQL 5.5)
|
||||||
host> cd cfg/mysql-5.5
|
host> cd cfg/mysql-5.5
|
||||||
|
|
||||||
# Make cnf files read only
|
# Make cnf files read only
|
||||||
host> chmod 0444 *.cnf
|
host> chmod 0444 *.cnf
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
* :ref:`my_cnf`
|
* :ref:`my_cnf`
|
||||||
* https://github.com/cytopia/devilbox/issues/212
|
* https://github.com/cytopia/devilbox/issues/212
|
||||||
|
@ -44,77 +44,75 @@ Open ``docker-compose.override.yml`` with your favourite editor and paste the fo
|
|||||||
into it.
|
into it.
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:caption: docker-compose.override.yml
|
:caption: docker-compose.override.yml
|
||||||
:name: docker-compose.override.yml
|
:emphasize-lines: 4,5,8
|
||||||
:emphasize-lines: 4,5,8
|
|
||||||
|
|
||||||
version: '2.1'
|
version: '2.1'
|
||||||
services:
|
services:
|
||||||
# Your custom Docker image here:
|
# Your custom Docker image here:
|
||||||
<name>:
|
<name>:
|
||||||
image: <image-name>:<image-version>
|
image: <image-name>:<image-version>
|
||||||
networks:
|
networks:
|
||||||
app_net:
|
app_net:
|
||||||
ipv4_address: <unused-ip-address>
|
ipv4_address: <unused-ip-address>
|
||||||
# For ease of use always automatically start these:
|
# For ease of use always automatically start these:
|
||||||
depends_on:
|
depends_on:
|
||||||
- bind
|
- bind
|
||||||
- php
|
- php
|
||||||
- httpd
|
- httpd
|
||||||
# End of custom Docker image
|
# End of custom Docker image
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
* ``<name>`` has to be replaced with any name of your choice
|
* ``<name>`` has to be replaced with any name of your choice
|
||||||
* ``<image-name>`` has to be replaced with the name of the Docker image
|
* ``<image-name>`` has to be replaced with the name of the Docker image
|
||||||
* ``<image-version>`` has to be replaced with the tag of the Docker image
|
* ``<image-version>`` has to be replaced with the tag of the Docker image
|
||||||
* ``<unused-ip-address>`` has to be replaced with an unused IP address
|
* ``<unused-ip-address>`` has to be replaced with an unused IP address
|
||||||
|
|
||||||
Two new services
|
Two new services
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:caption: docker-compose.override.yml
|
:caption: docker-compose.override.yml
|
||||||
:name: docker-compose.override.yml
|
:emphasize-lines: 4,5,8,16,17,20
|
||||||
:emphasize-lines: 4,5,8,16,17,20
|
|
||||||
|
|
||||||
version: '2.1'
|
version: '2.1'
|
||||||
services:
|
services:
|
||||||
# Your first custom Docker image here:
|
# Your first custom Docker image here:
|
||||||
<name1>:
|
<name1>:
|
||||||
image: <image1-name>:<image1-version>
|
image: <image1-name>:<image1-version>
|
||||||
networks:
|
networks:
|
||||||
app_net:
|
app_net:
|
||||||
ipv4_address: <unused-ip-address1>
|
ipv4_address: <unused-ip-address1>
|
||||||
# For ease of use always automatically start these:
|
# For ease of use always automatically start these:
|
||||||
depends_on:
|
depends_on:
|
||||||
- bind
|
- bind
|
||||||
- php
|
- php
|
||||||
- httpd
|
- httpd
|
||||||
# End of first custom Docker image
|
# End of first custom Docker image
|
||||||
# Your second custom Docker image here:
|
# Your second custom Docker image here:
|
||||||
<name2>:
|
<name2>:
|
||||||
image: <image2-name>:<image2-version>
|
image: <image2-name>:<image2-version>
|
||||||
networks:
|
networks:
|
||||||
app_net:
|
app_net:
|
||||||
ipv4_address: <unused-ip-address2>
|
ipv4_address: <unused-ip-address2>
|
||||||
# For ease of use always automatically start these:
|
# For ease of use always automatically start these:
|
||||||
depends_on:
|
depends_on:
|
||||||
- bind
|
- bind
|
||||||
- php
|
- php
|
||||||
- httpd
|
- httpd
|
||||||
# End of second custom Docker image
|
# End of second custom Docker image
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
* ``<name1>`` has to be replaced with any name of your choice
|
* ``<name1>`` has to be replaced with any name of your choice
|
||||||
* ``<image1-name>`` has to be replaced with the name of the Docker image
|
* ``<image1-name>`` has to be replaced with the name of the Docker image
|
||||||
* ``<image1-version>`` has to be replaced with the tag of the Docker image
|
* ``<image1-version>`` has to be replaced with the tag of the Docker image
|
||||||
* ``<unused-ip-address1>`` has to be replaced with an unused IP address
|
* ``<unused-ip-address1>`` has to be replaced with an unused IP address
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
* ``<name2>`` has to be replaced with any name of your choice
|
* ``<name2>`` has to be replaced with any name of your choice
|
||||||
* ``<image2-name>`` has to be replaced with the name of the Docker image
|
* ``<image2-name>`` has to be replaced with the name of the Docker image
|
||||||
* ``<image2-version>`` has to be replaced with the tag of the Docker image
|
* ``<image2-version>`` has to be replaced with the tag of the Docker image
|
||||||
* ``<unused-ip-address2>`` has to be replaced with an unused IP address
|
* ``<unused-ip-address2>`` has to be replaced with an unused IP address
|
||||||
|
|
||||||
|
|
||||||
CockroachDB example
|
CockroachDB example
|
||||||
@ -131,25 +129,24 @@ Docker image:
|
|||||||
Now add the information to ``docker-compose.override.yml``:
|
Now add the information to ``docker-compose.override.yml``:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:caption: docker-compose.override.yml
|
:caption: docker-compose.override.yml
|
||||||
:name: docker-compose.override.yml
|
:emphasize-lines: 4-5,9
|
||||||
:emphasize-lines: 4-5,9
|
|
||||||
|
|
||||||
version: '2.1'
|
version: '2.1'
|
||||||
services:
|
services:
|
||||||
# Your custom Docker image here:
|
# Your custom Docker image here:
|
||||||
cockroach:
|
cockroach:
|
||||||
image: cockroachdb/cockroach:latest
|
image: cockroachdb/cockroach:latest
|
||||||
command: start --insecure
|
command: start --insecure
|
||||||
networks:
|
networks:
|
||||||
app_net:
|
app_net:
|
||||||
ipv4_address: 172.16.238.200
|
ipv4_address: 172.16.238.200
|
||||||
# For ease of use always automatically start these:
|
# For ease of use always automatically start these:
|
||||||
depends_on:
|
depends_on:
|
||||||
- bind
|
- bind
|
||||||
- php
|
- php
|
||||||
- httpd
|
- httpd
|
||||||
# End of custom Docker image
|
# End of custom Docker image
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -162,18 +159,18 @@ name you have chosen.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> docker-compose up <name>
|
host> docker-compose up <name>
|
||||||
|
|
||||||
In the example of Cockroach DB the command would look like this
|
In the example of Cockroach DB the command would look like this
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
host> docker-compose up cockroach
|
host> docker-compose up cockroach
|
||||||
|
|
||||||
|
|
||||||
Further reading
|
Further reading
|
||||||
===============
|
===============
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
* :ref:`docker_compose_override_yml`
|
* :ref:`docker_compose_override_yml`
|
||||||
* :ref:`overwrite_existing_docker_image`
|
* :ref:`overwrite_existing_docker_image`
|
||||||
|
@ -59,32 +59,31 @@ default generation process via templates. Those templates can be added to each p
|
|||||||
you the option to customize the virtual host of this specific project.
|
you the option to customize the virtual host of this specific project.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
:ref:`custom_vhost`
|
:ref:`custom_vhost`
|
||||||
Ensure you have read and understand how to customize your virtual host with ``vhost-gen``.
|
Ensure you have read and understand how to customize your virtual host with ``vhost-gen``.
|
||||||
:ref:`env_httpd_template_dir`
|
:ref:`env_httpd_template_dir`
|
||||||
Ensure you know what this variable does inside your ``.env`` file.
|
Ensure you know what this variable does inside your ``.env`` file.
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
When adjusting vhost-gen templates for a project you have to do **one** of the following:
|
When adjusting vhost-gen templates for a project you have to do **one** of the following:
|
||||||
|
|
||||||
* Restart the devilbox
|
* Restart the devilbox
|
||||||
* Or rename your project directory to some other name and then rename it back to its original
|
* Or rename your project directory to some other name and then rename it back to its original name.
|
||||||
name.
|
|
||||||
|
|
||||||
More information here: :ref:`custom_vhost_apply_vhost_gen_changes`
|
More information here: :ref:`custom_vhost_apply_vhost_gen_changes`
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Pay close attention that you do not use TAB (``\t``) characters for indenting the vhost-gen
|
Pay close attention that you do not use TAB (``\t``) characters for indenting the vhost-gen
|
||||||
yaml files. Some editors might automatically indent using TABs, so ensure they are replaced
|
yaml files. Some editors might automatically indent using TABs, so ensure they are replaced
|
||||||
with spaces. If TAB characters are present, those files become invalid and won't work.
|
with spaces. If TAB characters are present, those files become invalid and won't work.
|
||||||
https://github.com/cytopia/devilbox/issues/142
|
https://github.com/cytopia/devilbox/issues/142
|
||||||
|
|
||||||
You can use the bundled ``yamllint`` binary inside the container to validate your config.
|
You can use the bundled ``yamllint`` binary inside the container to validate your config.
|
||||||
|
|
||||||
**See also:**
|
**See also:**
|
||||||
|
|
||||||
* :ref:`tutorial_work_inside_the_php_container`
|
* :ref:`tutorial_work_inside_the_php_container`
|
||||||
* :ref:`available_tools`
|
* :ref:`available_tools`
|
||||||
|
|
||||||
|
|
||||||
Prerequisite
|
Prerequisite
|
||||||
@ -110,14 +109,14 @@ Ensure that the default ``vhost-gen`` templates have been copied to your project
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd ./home/user/devilbox
|
host> cd ./home/user/devilbox
|
||||||
|
|
||||||
# Create template directory in your project
|
# Create template directory in your project
|
||||||
host> mkdir ./data/www/project-1/.devilbox
|
host> mkdir ./data/www/project-1/.devilbox
|
||||||
|
|
||||||
# Copy vhost-gen templates
|
# Copy vhost-gen templates
|
||||||
host> cp templates/vhost-gen/* ./data/www/project-1/.devilbox
|
host> cp templates/vhost-gen/* ./data/www/project-1/.devilbox
|
||||||
|
|
||||||
By having done all prerequisite, your project should be available under http://my-project-1.loc
|
By having done all prerequisite, your project should be available under http://my-project-1.loc
|
||||||
|
|
||||||
@ -153,7 +152,6 @@ here).
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:caption: /home/user/devilbox/data/www/project-1/.devilbox/apache22.yml
|
:caption: /home/user/devilbox/data/www/project-1/.devilbox/apache22.yml
|
||||||
:name: apache22.yml
|
|
||||||
:emphasize-lines: 3
|
:emphasize-lines: 3
|
||||||
|
|
||||||
vhost: |
|
vhost: |
|
||||||
@ -177,7 +175,6 @@ All you will have to do, is to add another ``ServerName`` directive:
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:caption: /home/user/devilbox/data/www/project-1/.devilbox/apache22.yml
|
:caption: /home/user/devilbox/data/www/project-1/.devilbox/apache22.yml
|
||||||
:name: apache22.yml
|
|
||||||
:emphasize-lines: 3,4
|
:emphasize-lines: 3,4
|
||||||
|
|
||||||
vhost: |
|
vhost: |
|
||||||
@ -232,7 +229,6 @@ here).
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:caption: /home/user/devilbox/data/www/project-1/.devilbox/apache22.yml
|
:caption: /home/user/devilbox/data/www/project-1/.devilbox/apache22.yml
|
||||||
:name: apache22.yml
|
|
||||||
:emphasize-lines: 3
|
:emphasize-lines: 3
|
||||||
|
|
||||||
vhost: |
|
vhost: |
|
||||||
@ -256,7 +252,6 @@ All you will have to do, is to add another ``ServerName`` directive which does c
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:caption: /home/user/devilbox/data/www/project-1/.devilbox/apache22.yml
|
:caption: /home/user/devilbox/data/www/project-1/.devilbox/apache22.yml
|
||||||
:name: apache22.yml
|
|
||||||
:emphasize-lines: 3,4
|
:emphasize-lines: 3,4
|
||||||
|
|
||||||
vhost: |
|
vhost: |
|
||||||
@ -325,7 +320,6 @@ here).
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:caption: /home/user/devilbox/data/www/project-1/.devilbox/nginx.yml
|
:caption: /home/user/devilbox/data/www/project-1/.devilbox/nginx.yml
|
||||||
:name: nginx.yml
|
|
||||||
:emphasize-lines: 4
|
:emphasize-lines: 4
|
||||||
|
|
||||||
vhost: |
|
vhost: |
|
||||||
@ -350,7 +344,6 @@ All you will have to do, is to extend the ``server_name`` directive:
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:caption: /home/user/devilbox/data/www/project-1/.devilbox/nginx.yml
|
:caption: /home/user/devilbox/data/www/project-1/.devilbox/nginx.yml
|
||||||
:name: nginx.yml
|
|
||||||
:emphasize-lines: 4
|
:emphasize-lines: 4
|
||||||
|
|
||||||
vhost: |
|
vhost: |
|
||||||
@ -407,7 +400,6 @@ here).
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:caption: /home/user/devilbox/data/www/project-1/.devilbox/nginx.yml
|
:caption: /home/user/devilbox/data/www/project-1/.devilbox/nginx.yml
|
||||||
:name: nginx.yml
|
|
||||||
:emphasize-lines: 4
|
:emphasize-lines: 4
|
||||||
|
|
||||||
vhost: |
|
vhost: |
|
||||||
@ -432,7 +424,6 @@ All you will have to do, is to extend the ``server_name`` directive with a catch
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:caption: /home/user/devilbox/data/www/project-1/.devilbox/nginx.yml
|
:caption: /home/user/devilbox/data/www/project-1/.devilbox/nginx.yml
|
||||||
:name: nginx.yml
|
|
||||||
:emphasize-lines: 4
|
:emphasize-lines: 4
|
||||||
|
|
||||||
vhost: |
|
vhost: |
|
||||||
@ -475,34 +466,34 @@ Let's cover the second step
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the data directory
|
# Navigate to the data directory
|
||||||
host> /home/user/devilbox/data/www
|
host> /home/user/devilbox/data/www
|
||||||
|
|
||||||
# Rename your project to something else
|
# Rename your project to something else
|
||||||
host> mv project-1 project-1.tmp
|
host> mv project-1 project-1.tmp
|
||||||
|
|
||||||
# Rename your project to its original name
|
# Rename your project to its original name
|
||||||
host> mv project-1.tmp project-1
|
host> mv project-1.tmp project-1
|
||||||
|
|
||||||
If you want to understand what is going on right now, check the docker logs for the web server.
|
If you want to understand what is going on right now, check the docker logs for the web server.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the devilbox directory
|
# Navigate to the devilbox directory
|
||||||
host> /home/user/devilbox
|
host> /home/user/devilbox
|
||||||
|
|
||||||
# Check docker logs
|
# Check docker logs
|
||||||
host> docker-compose logs httpd
|
host> docker-compose logs httpd
|
||||||
|
|
||||||
httpd_1 | vhostgen: [2018-03-18 11:46:52] Adding: project-1.tmp.loc
|
httpd_1 | vhostgen: [2018-03-18 11:46:52] Adding: project-1.tmp.loc
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] ADD: succeeded: /shared/httpd/project-1.tmp
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] ADD: succeeded: /shared/httpd/project-1.tmp
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] DEL: succeeded: /shared/httpd/project-1
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] DEL: succeeded: /shared/httpd/project-1
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] TRIGGER succeeded: /usr/local/apache2/bin/httpd -k restart
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] TRIGGER succeeded: /usr/local/apache2/bin/httpd -k restart
|
||||||
|
|
||||||
httpd_1 | vhostgen: [2018-03-18 11:46:52] Adding: project-1loc
|
httpd_1 | vhostgen: [2018-03-18 11:46:52] Adding: project-1loc
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] ADD: succeeded: /shared/httpd/project-1
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] ADD: succeeded: /shared/httpd/project-1
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] DEL: succeeded: /shared/httpd/project-1.tmp
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] DEL: succeeded: /shared/httpd/project-1.tmp
|
||||||
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] TRIGGER succeeded: /usr/local/apache2/bin/httpd -k restart
|
httpd_1 | watcherd: [2018-03-18 11:46:52] [OK] TRIGGER succeeded: /usr/local/apache2/bin/httpd -k restart
|
||||||
|
|
||||||
**What happened?**
|
**What happened?**
|
||||||
|
|
||||||
|
@ -21,11 +21,11 @@ Shut down the Devilbox in case it is still running:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> /home/user/devilbox
|
host> /home/user/devilbox
|
||||||
|
|
||||||
# Stop all container
|
# Stop all container
|
||||||
host> docker-compose stop
|
host> docker-compose stop
|
||||||
|
|
||||||
|
|
||||||
Edit the ``.env`` file
|
Edit the ``.env`` file
|
||||||
@ -36,18 +36,17 @@ It will look something like this:
|
|||||||
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:emphasize-lines: 5
|
:emphasize-lines: 5
|
||||||
|
|
||||||
#PHP_SERVER=5.3
|
#PHP_SERVER=5.3
|
||||||
#PHP_SERVER=5.4
|
#PHP_SERVER=5.4
|
||||||
#PHP_SERVER=5.5
|
#PHP_SERVER=5.5
|
||||||
#PHP_SERVER=5.6
|
#PHP_SERVER=5.6
|
||||||
#PHP_SERVER=7.0
|
#PHP_SERVER=7.0
|
||||||
PHP_SERVER=7.1
|
PHP_SERVER=7.1
|
||||||
#PHP_SERVER=7.2
|
#PHP_SERVER=7.2
|
||||||
#PHP_SERVER=7.3
|
#PHP_SERVER=7.3
|
||||||
|
|
||||||
As you can see, all available values are already there, but commented. Only one is uncommented.
|
As you can see, all available values are already there, but commented. Only one is uncommented.
|
||||||
In this example it is ``7.1``, which is the PHP version that will be started, once the Devilbox
|
In this example it is ``7.1``, which is the PHP version that will be started, once the Devilbox
|
||||||
@ -59,18 +58,17 @@ To change this, simply uncomment your version of choice and save this file. Do n
|
|||||||
In order to enable PHP 5.5, you would change the ``.env`` file like this:
|
In order to enable PHP 5.5, you would change the ``.env`` file like this:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:emphasize-lines: 2
|
:emphasize-lines: 2
|
||||||
|
|
||||||
#PHP_SERVER=5.3
|
#PHP_SERVER=5.3
|
||||||
#PHP_SERVER=5.4
|
#PHP_SERVER=5.4
|
||||||
PHP_SERVER=5.5
|
PHP_SERVER=5.5
|
||||||
#PHP_SERVER=5.6
|
#PHP_SERVER=5.6
|
||||||
#PHP_SERVER=7.0
|
#PHP_SERVER=7.0
|
||||||
#PHP_SERVER=7.1
|
#PHP_SERVER=7.1
|
||||||
#PHP_SERVER=7.2
|
#PHP_SERVER=7.2
|
||||||
#PHP_SERVER=7.3
|
#PHP_SERVER=7.3
|
||||||
|
|
||||||
|
|
||||||
Start the Devilbox
|
Start the Devilbox
|
||||||
@ -80,11 +78,11 @@ Now save the file and you can start the Devilbox again.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> /home/user/devilbox
|
host> /home/user/devilbox
|
||||||
|
|
||||||
# Stop all container
|
# Stop all container
|
||||||
host> docker-compose up php httpd bind
|
host> docker-compose up php httpd bind
|
||||||
|
|
||||||
.. seealso:: :ref:`start_the_devilbox`
|
.. seealso:: :ref:`start_the_devilbox`
|
||||||
|
|
||||||
@ -97,18 +95,17 @@ If two versions are uncommented, always the last one takes precedence.
|
|||||||
Consider this ``.env`` file:
|
Consider this ``.env`` file:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:emphasize-lines: 2,4
|
:emphasize-lines: 2,4
|
||||||
|
|
||||||
#PHP_SERVER=5.3
|
#PHP_SERVER=5.3
|
||||||
#PHP_SERVER=5.4
|
#PHP_SERVER=5.4
|
||||||
PHP_SERVER=5.5
|
PHP_SERVER=5.5
|
||||||
#PHP_SERVER=5.6
|
#PHP_SERVER=5.6
|
||||||
PHP_SERVER=7.0
|
PHP_SERVER=7.0
|
||||||
#PHP_SERVER=7.1
|
#PHP_SERVER=7.1
|
||||||
#PHP_SERVER=7.2
|
#PHP_SERVER=7.2
|
||||||
#PHP_SERVER=7.3
|
#PHP_SERVER=7.3
|
||||||
|
|
||||||
Both, PHP 5.4 and PHP 7.0 are uncommented, however, when you start the Devilbox, it will use
|
Both, PHP 5.4 and PHP 7.0 are uncommented, however, when you start the Devilbox, it will use
|
||||||
PHP 7.0 as this value overwrites any previous ones.
|
PHP 7.0 as this value overwrites any previous ones.
|
||||||
@ -124,7 +121,7 @@ The variable names of all available services with changable versions are in the
|
|||||||
``<SERVICE>_SERVER``. Just look through the :ref:`env_file`.
|
``<SERVICE>_SERVER``. Just look through the :ref:`env_file`.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
The following variables control service versions:
|
The following variables control service versions:
|
||||||
:ref:`env_php_server`, :ref:`env_httpd_server`, :ref:`env_mysql_server`, :ref:`env_pgsql_server`, :ref:`env_redis_server`, :ref:`env_memcd_server`, :ref:`env_mongo_server`
|
:ref:`env_php_server`, :ref:`env_httpd_server`, :ref:`env_mysql_server`, :ref:`env_pgsql_server`, :ref:`env_redis_server`, :ref:`env_memcd_server`, :ref:`env_mongo_server`
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,26 +106,23 @@ If you are running Linux as your host operating system you would use the IP addr
|
|||||||
computer which was identified as ``172.16.238.1``.
|
computer which was identified as ``172.16.238.1``.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
:caption: .env
|
||||||
:caption: .env
|
|
||||||
|
|
||||||
EXTRA_HOSTS=mywebserver.loc=172.16.238.1
|
EXTRA_HOSTS=mywebserver.loc=172.16.238.1
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
:caption: .env
|
||||||
:caption: .env
|
|
||||||
|
|
||||||
EXTRA_HOSTS=mywebserver.loc=docker.for.lin.host.internal
|
EXTRA_HOSTS=mywebserver.loc=docker.for.lin.host.internal
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
:caption: .env
|
||||||
:caption: .env
|
|
||||||
|
|
||||||
EXTRA_HOSTS=mywebserver.loc=docker.for.lin.localhost
|
EXTRA_HOSTS=mywebserver.loc=docker.for.lin.localhost
|
||||||
|
|
||||||
|
|
||||||
Mapping on MacOS
|
Mapping on MacOS
|
||||||
@ -135,10 +132,9 @@ If you are running MacOS as your host operating system you would use one of the
|
|||||||
(depending on your Docker version).
|
(depending on your Docker version).
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
:caption: .env
|
||||||
:caption: .env
|
|
||||||
|
|
||||||
EXTRA_HOSTS=mywebserver.loc=host.docker.internal
|
EXTRA_HOSTS=mywebserver.loc=host.docker.internal
|
||||||
|
|
||||||
The CNAME ``host.docker.internal`` will be resolved to an IP address during startup and ``mywebserver.loc``
|
The CNAME ``host.docker.internal`` will be resolved to an IP address during startup and ``mywebserver.loc``
|
||||||
's DNS record will point to that IP address.
|
's DNS record will point to that IP address.
|
||||||
@ -151,10 +147,9 @@ If you are running Windows as your host operating system you would use one of th
|
|||||||
(depending on your Docker version).
|
(depending on your Docker version).
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:name: .env
|
:caption: .env
|
||||||
:caption: .env
|
|
||||||
|
|
||||||
EXTRA_HOSTS=mywebserver.loc=docker.for.win.host.internal
|
EXTRA_HOSTS=mywebserver.loc=docker.for.win.host.internal
|
||||||
|
|
||||||
The CNAME ``docker.for.win.host.internal`` will be resolved to an IP address during startup and ``mywebserver.loc``
|
The CNAME ``docker.for.win.host.internal`` will be resolved to an IP address during startup and ``mywebserver.loc``
|
||||||
's DNS record will point to that IP address.
|
's DNS record will point to that IP address.
|
||||||
@ -171,5 +166,5 @@ Further reading
|
|||||||
===============
|
===============
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
* :ref:`env_extra_hosts`
|
* :ref:`env_extra_hosts`
|
||||||
* :ref:`global_configuration_auto_dns`
|
* :ref:`global_configuration_auto_dns`
|
||||||
|
@ -24,7 +24,6 @@ would add the following to the ``.env`` file:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
:caption: .env
|
:caption: .env
|
||||||
:name: .env
|
|
||||||
:emphasize-lines: 1
|
:emphasize-lines: 1
|
||||||
|
|
||||||
APPLICATION_ENV=production
|
APPLICATION_ENV=production
|
||||||
@ -32,8 +31,8 @@ would add the following to the ``.env`` file:
|
|||||||
You need to restart the Devilbox for the changes to take effect.
|
You need to restart the Devilbox for the changes to take effect.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
There is already a proposed section inside the ``.env`` file at the very bottom
|
There is already a proposed section inside the ``.env`` file at the very bottom
|
||||||
to add you custom variables to differentiate them from the Devilbox required variables.
|
to add you custom variables to differentiate them from the Devilbox required variables.
|
||||||
|
|
||||||
|
|
||||||
Use custom environment variables
|
Use custom environment variables
|
||||||
@ -44,7 +43,6 @@ You can use the PHP's built-in function ``getenv`` to obtain the value:
|
|||||||
|
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
:caption: index.php
|
:caption: index.php
|
||||||
:name: index.php
|
|
||||||
:emphasize-lines: 3
|
:emphasize-lines: 3
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -7,8 +7,8 @@ Enable Xdebug
|
|||||||
This tutorial shows you how to enable and use Xdebug with the Devilbox.
|
This tutorial shows you how to enable and use Xdebug with the Devilbox.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
If you are unsure of how to add custom ``*.ini`` files to the Devilbox,
|
If you are unsure of how to add custom ``*.ini`` files to the Devilbox,
|
||||||
have a look at this section first: :ref:`php_ini`
|
have a look at this section first: :ref:`php_ini`
|
||||||
|
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
|
@ -49,66 +49,63 @@ First you simply copy the while definition of the bind service from ``docker-com
|
|||||||
``docker-compose.override.yml``:
|
``docker-compose.override.yml``:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:name: docker-compose.override.yml
|
:caption: docker-compose.override.yml
|
||||||
:caption: docker-compose.override.yml
|
|
||||||
|
|
||||||
version: '2.1'
|
version: '2.1'
|
||||||
services:
|
services:
|
||||||
bind:
|
bind:
|
||||||
image: cytopia/bind:0.11
|
image: cytopia/bind:0.11
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
# [local-machine:]local-port:docker-port
|
# [local-machine:]local-port:docker-port
|
||||||
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53"
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53"
|
||||||
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53/udp"
|
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53/udp"
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
##
|
##
|
||||||
## Debug?
|
## Debug?
|
||||||
##
|
##
|
||||||
- DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
|
- DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
|
||||||
- DOCKER_LOGS=1
|
- DOCKER_LOGS=1
|
||||||
|
|
||||||
##
|
##
|
||||||
## Bind settings
|
## Bind settings
|
||||||
##
|
##
|
||||||
- WILDCARD_ADDRESS=172.16.238.11
|
- WILDCARD_ADDRESS=172.16.238.11
|
||||||
- DNS_FORWARDER=${BIND_DNS_RESOLVER:-8.8.8.8,8.8.4.4}
|
- DNS_FORWARDER=${BIND_DNS_RESOLVER:-8.8.8.8,8.8.4.4}
|
||||||
|
|
||||||
dns:
|
dns:
|
||||||
- 127.0.0.1
|
- 127.0.0.1
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
app_net:
|
app_net:
|
||||||
ipv4_address: 172.16.238.100
|
ipv4_address: 172.16.238.100
|
||||||
|
|
||||||
The second step is to remove everything that you do not need to overwrite:
|
The second step is to remove everything that you do not need to overwrite:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:name: docker-compose.override.yml
|
:caption: docker-compose.override.yml
|
||||||
:caption: docker-compose.override.yml
|
|
||||||
|
|
||||||
version: '2.1'
|
version: '2.1'
|
||||||
services:
|
services:
|
||||||
bind:
|
bind:
|
||||||
image: cytopia/bind:0.11
|
image: cytopia/bind:0.11
|
||||||
|
|
||||||
The last step is to actually adjust the value you want to change for the bind service:
|
The last step is to actually adjust the value you want to change for the bind service:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
:name: docker-compose.override.yml
|
:caption: docker-compose.override.yml
|
||||||
:caption: docker-compose.override.yml
|
:emphasize-lines: 4
|
||||||
:emphasize-lines: 4
|
|
||||||
|
|
||||||
version: '2.1'
|
version: '2.1'
|
||||||
services:
|
services:
|
||||||
bind:
|
bind:
|
||||||
image: someother/bind:latest
|
image: someother/bind:latest
|
||||||
|
|
||||||
|
|
||||||
Further reading
|
Further reading
|
||||||
===============
|
===============
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
* :ref:`docker_compose_override_yml`
|
* :ref:`docker_compose_override_yml`
|
||||||
* :ref:`add_your_own_docker_image`
|
* :ref:`add_your_own_docker_image`
|
||||||
|
@ -8,8 +8,8 @@ This tutorial gives you a general overview how to do static code analysis from w
|
|||||||
container.
|
container.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
* :ref:`available_tools`
|
* :ref:`available_tools`
|
||||||
* :ref:`tutorial_work_inside_the_php_container`
|
* :ref:`tutorial_work_inside_the_php_container`
|
||||||
|
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
@ -40,34 +40,34 @@ Some of the bundled tools even allow for automatic fixing.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# 1. Enter your PHP container
|
# 1. Enter your PHP container
|
||||||
host> ./bash
|
host> ./bash
|
||||||
|
|
||||||
# 2. Go to your project folder
|
# 2. Go to your project folder
|
||||||
devilbox@php-7.0.20 $ cd /shared/httpd/my-project
|
devilbox@php-7.0.20 $ cd /shared/httpd/my-project
|
||||||
|
|
||||||
# 3. Run the tools
|
# 3. Run the tools
|
||||||
devilbox@php-7.0.20 $ git-conflicts --path=.
|
devilbox@php-7.0.20 $ git-conflicts --path=.
|
||||||
devilbox@php-7.0.20 $ git-ignored --path=.
|
devilbox@php-7.0.20 $ git-ignored --path=.
|
||||||
devilbox@php-7.0.20 $ file-cr --path=.
|
devilbox@php-7.0.20 $ file-cr --path=.
|
||||||
devilbox@php-7.0.20 $ file-crlf --path=.
|
devilbox@php-7.0.20 $ file-crlf --path=.
|
||||||
devilbox@php-7.0.20 $ file-empty --path=.
|
devilbox@php-7.0.20 $ file-empty --path=.
|
||||||
|
|
||||||
# 4. Run tools with more options
|
# 4. Run tools with more options
|
||||||
devilbox@php-7.0.20 $ syntax-php --path=. --extension=php
|
devilbox@php-7.0.20 $ syntax-php --path=. --extension=php
|
||||||
devilbox@php-7.0.20 $ syntax-php --path=. --shebang=php
|
devilbox@php-7.0.20 $ syntax-php --path=. --shebang=php
|
||||||
|
|
||||||
# 5. Various syntax checks
|
# 5. Various syntax checks
|
||||||
devilbox@php-7.0.20 $ syntax-bash --path=. --text --extension=sh
|
devilbox@php-7.0.20 $ syntax-bash --path=. --text --extension=sh
|
||||||
devilbox@php-7.0.20 $ syntax-css --path=. --text --extension=css
|
devilbox@php-7.0.20 $ syntax-css --path=. --text --extension=css
|
||||||
devilbox@php-7.0.20 $ syntax-js --path=. --text --extension=js
|
devilbox@php-7.0.20 $ syntax-js --path=. --text --extension=js
|
||||||
devilbox@php-7.0.20 $ syntax-json --path=. --text --extension=json
|
devilbox@php-7.0.20 $ syntax-json --path=. --text --extension=json
|
||||||
devilbox@php-7.0.20 $ syntax-markdown --path=. --text --extension=md
|
devilbox@php-7.0.20 $ syntax-markdown --path=. --text --extension=md
|
||||||
devilbox@php-7.0.20 $ syntax-perl --path=. --text --extension=pl
|
devilbox@php-7.0.20 $ syntax-perl --path=. --text --extension=pl
|
||||||
devilbox@php-7.0.20 $ syntax-php --path=. --text --extension=php
|
devilbox@php-7.0.20 $ syntax-php --path=. --text --extension=php
|
||||||
devilbox@php-7.0.20 $ syntax-python --path=. --text --extension=python
|
devilbox@php-7.0.20 $ syntax-python --path=. --text --extension=python
|
||||||
devilbox@php-7.0.20 $ syntax-ruby --path=. --text --extension=rb
|
devilbox@php-7.0.20 $ syntax-ruby --path=. --text --extension=rb
|
||||||
devilbox@php-7.0.20 $ syntax-scss --path=. --text --extension=scss
|
devilbox@php-7.0.20 $ syntax-scss --path=. --text --extension=scss
|
||||||
|
|
||||||
|
|
||||||
PHPCS
|
PHPCS
|
||||||
@ -79,14 +79,14 @@ PHPCS is a code style analyser for PHP.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# 1. Enter your PHP container
|
# 1. Enter your PHP container
|
||||||
host> ./bash
|
host> ./bash
|
||||||
|
|
||||||
# 2. Go to your project folder
|
# 2. Go to your project folder
|
||||||
devilbox@php-7.0.20 $ cd /shared/httpd/my-project
|
devilbox@php-7.0.20 $ cd /shared/httpd/my-project
|
||||||
|
|
||||||
# 3. Run it
|
# 3. Run it
|
||||||
devilbox@php-7.0.20 $ phpcs .
|
devilbox@php-7.0.20 $ phpcs .
|
||||||
|
|
||||||
|
|
||||||
ESLint
|
ESLint
|
||||||
@ -98,11 +98,11 @@ ESLint is a Javascript static source code analyzer.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# 1. Enter your PHP container
|
# 1. Enter your PHP container
|
||||||
host> ./bash
|
host> ./bash
|
||||||
|
|
||||||
# 2. Go to your project folder
|
# 2. Go to your project folder
|
||||||
devilbox@php-7.0.20 $ cd /shared/httpd/my-project
|
devilbox@php-7.0.20 $ cd /shared/httpd/my-project
|
||||||
|
|
||||||
# 3. Run it
|
# 3. Run it
|
||||||
devilbox@php-7.0.20 $ eslint .
|
devilbox@php-7.0.20 $ eslint .
|
||||||
|
@ -34,14 +34,14 @@ Entering from Linux or MacOS: ``shell.sh``
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
host> cd /path/to/devilbox
|
host> cd /path/to/devilbox
|
||||||
|
|
||||||
# Run provided script
|
# Run provided script
|
||||||
host> ./shell.sh
|
host> ./shell.sh
|
||||||
|
|
||||||
# Now you are inside the PHP Linux container
|
# Now you are inside the PHP Linux container
|
||||||
devilbox@php-7.0.19 in /shared/httpd $
|
devilbox@php-7.0.19 in /shared/httpd $
|
||||||
|
|
||||||
|
|
||||||
Entering from Windows: ``shell.bat``
|
Entering from Windows: ``shell.bat``
|
||||||
@ -49,14 +49,14 @@ Entering from Windows: ``shell.bat``
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Navigate to the Devilbox directory
|
# Navigate to the Devilbox directory
|
||||||
C:/> cd C:/Users/user1/devilbox
|
C:/> cd C:/Users/user1/devilbox
|
||||||
|
|
||||||
# Run provided script
|
# Run provided script
|
||||||
C:/Users/user1/devilbox> shell.bat
|
C:/Users/user1/devilbox> shell.bat
|
||||||
|
|
||||||
# Now you are inside the PHP Linux container
|
# Now you are inside the PHP Linux container
|
||||||
devilbox@php-7.0.19 in /shared/httpd $
|
devilbox@php-7.0.19 in /shared/httpd $
|
||||||
|
|
||||||
|
|
||||||
Inside the container
|
Inside the container
|
||||||
@ -77,8 +77,8 @@ The uid and gid mappings are controlled via two ``.env`` variables called :ref:`
|
|||||||
|
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
If you want to find out more about synronized container permissions read up here:
|
If you want to find out more about synronized container permissions read up here:
|
||||||
:ref:`syncronize_container_permissions`
|
:ref:`syncronize_container_permissions`
|
||||||
|
|
||||||
|
|
||||||
``root`` user
|
``root`` user
|
||||||
@ -92,19 +92,19 @@ By default ``sudo`` is configured to be used without passwords, so you can simpl
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# As user devilbox inside the container
|
# As user devilbox inside the container
|
||||||
devilbox@php-7.0.19 in /shared/httpd $ sudo su -
|
devilbox@php-7.0.19 in /shared/httpd $ sudo su -
|
||||||
|
|
||||||
# You are now the root user
|
# You are now the root user
|
||||||
root@php-7.0.19 in /shared/httpd $
|
root@php-7.0.19 in /shared/httpd $
|
||||||
|
|
||||||
You can also use ``sudo`` to run commands with root privileges without having to become root first.
|
You can also use ``sudo`` to run commands with root privileges without having to become root first.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# As user devilbox inside the container
|
# As user devilbox inside the container
|
||||||
devilbox@php-7.0.19 in /shared/httpd $ sudo apt update
|
devilbox@php-7.0.19 in /shared/httpd $ sudo apt update
|
||||||
devilbox@php-7.0.19 in /shared/httpd $ sudo apt install nmap
|
devilbox@php-7.0.19 in /shared/httpd $ sudo apt install nmap
|
||||||
|
|
||||||
|
|
||||||
Leave the container
|
Leave the container
|
||||||
@ -115,11 +115,11 @@ and you are out.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# As user devilbox inside the container
|
# As user devilbox inside the container
|
||||||
devilbox@php-7.0.19 in /shared/httpd $ exit
|
devilbox@php-7.0.19 in /shared/httpd $ exit
|
||||||
|
|
||||||
# You are now back on your host operating system
|
# You are now back on your host operating system
|
||||||
host>
|
host>
|
||||||
|
|
||||||
|
|
||||||
Host to Container mappings
|
Host to Container mappings
|
||||||
@ -199,28 +199,28 @@ An example to access the MySQL database from either host or within the PHP conta
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Access MySQL from your host operating system
|
# Access MySQL from your host operating system
|
||||||
host> mysql -h 127.0.0.1
|
host> mysql -h 127.0.0.1
|
||||||
|
|
||||||
# Access MySQL from within the PHP container
|
# Access MySQL from within the PHP container
|
||||||
devilbox@php-7.0.19 in /shared/httpd $ mysql -h 127.0.0.1
|
devilbox@php-7.0.19 in /shared/httpd $ mysql -h 127.0.0.1
|
||||||
|
|
||||||
.. important::
|
.. important::
|
||||||
Do not use ``localhost`` to access the services, it does not map to ``127.0.0.1`` on
|
Do not use ``localhost`` to access the services, it does not map to ``127.0.0.1`` on
|
||||||
all cases.
|
all cases.
|
||||||
|
|
||||||
So when setting up a configuration file from your PHP project you would for example use
|
So when setting up a configuration file from your PHP project you would for example use
|
||||||
``127.0.0.`` as the host for your MySQL database connection:
|
``127.0.0.`` as the host for your MySQL database connection:
|
||||||
|
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// MySQL server connection
|
// MySQL server connection
|
||||||
mysql_host = '127.0.0.1';
|
mysql_host = '127.0.0.1';
|
||||||
mysql_port = '3306';
|
mysql_port = '3306';
|
||||||
mysql_user = 'someusername';
|
mysql_user = 'someusername';
|
||||||
mysql_pass = 'somepassword';
|
mysql_pass = 'somepassword';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
Imagine your PHP framework ships a command line tool to run database migration. You could run
|
Imagine your PHP framework ships a command line tool to run database migration. You could run
|
||||||
it from your host operating system or from within the PHP container. It would work from both
|
it from your host operating system or from within the PHP container. It would work from both
|
||||||
@ -230,8 +230,8 @@ You could also even switch between the Devilbox and a locally installed LAMP sta
|
|||||||
and still use the same configuration.
|
and still use the same configuration.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
The mapping of ``127.0.0.1`` to your host operating system does not work with
|
The mapping of ``127.0.0.1`` to your host operating system does not work with
|
||||||
:ref:`docker_toolbox`.
|
:ref:`docker_toolbox`.
|
||||||
|
|
||||||
|
|
||||||
Port mappings
|
Port mappings
|
||||||
@ -269,8 +269,8 @@ The PHP container is hooked up by default to the bundled DNS server and makes us
|
|||||||
:ref:`global_configuration_auto_dns`.
|
:ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
You can achieve the same on your host operating system by explicitly enabling auto-dns.
|
You can achieve the same on your host operating system by explicitly enabling auto-dns.
|
||||||
See also: :ref:`global_configuration_auto_dns`.
|
See also: :ref:`global_configuration_auto_dns`.
|
||||||
|
|
||||||
|
|
||||||
Checklist
|
Checklist
|
||||||
|
Loading…
Reference in New Issue
Block a user