devilbox/docs/Usage.md

78 lines
2.4 KiB
Markdown
Raw Normal View History

2017-05-20 19:39:57 +00:00
# Devilbox Documentation
2017-05-06 09:12:54 +00:00
2017-06-09 07:23:26 +00:00
**[Overview](README.md)** |
2017-06-08 07:25:03 +00:00
**Installing** |
**Updating** |
**Configuration** |
2017-06-10 13:07:26 +00:00
**[Run](Run.md)** |
2017-06-09 07:23:26 +00:00
**Usage** |
**[Examples](Examples.md)** |
2017-06-10 09:41:46 +00:00
**[Technical](Technical.md)** |
2017-06-09 07:23:26 +00:00
**[Hacking](Hacking.md)** |
**[FAQ](FAQ.md)**
2017-05-06 09:12:54 +00:00
2017-06-08 07:25:03 +00:00
---
2017-05-06 09:12:54 +00:00
## Usage
2017-06-10 13:19:06 +00:00
1. [Work inside the PHP container](#)
2017-06-08 07:25:03 +00:00
1. [As devilbox user](#)
2. [As root user](#)
3. [Available tools](#)
4. [Available URLs](#)
2017-06-10 13:19:06 +00:00
2. [Creating Projects](#)
2017-06-09 07:23:26 +00:00
1. [Creating projects on the docker host](#)
2. [Creating projects from inside the PHP container](#)
2017-06-10 13:19:06 +00:00
3. [Backups](#)
2017-06-09 07:23:26 +00:00
1. [Backup MySQL database](#)
2. [Backup PgSQL database](#)
2017-06-10 13:19:06 +00:00
4. [DNS](#)
2017-06-08 07:25:03 +00:00
1. [/etc/hosts](#)
2. [Auto-DNS](#)
2017-06-10 13:19:06 +00:00
5. [Intranet](#)
6. [Emails](#)
7. [Log files](#)
2017-06-08 07:25:03 +00:00
---
2017-06-10 13:07:26 +00:00
### 2. Creating Projects
This section is about how to start, stop, view and enter (all or a selection of some) containers. If you want to know how to choose the container type version (e.g. which mysql version or which php version) refer to the **[Configuration](Configuration.md)** section.
**Convention:** The terms *container* and *service* are used interchangeably.
**Assumption:** All `docker-compose` commands must be executed within the devilbox root directory, where the `docker-compose.yml` file resides.
``
2017-05-06 09:12:54 +00:00
#### 2.2 Show container stdout/stderr output
Services started in background mode (`-d`) or those that were started as dependencies (`http` and `php`) will always only log to docker logs and not to stdout/stderr. In order to view their output use:
```shell
$ docker-compose logs
```
### 3. Enter
#### 3.1 Enter the php container
The `php` container (which might also have hhvm installed, depending on your version choice) is the container you can use to enter if you want to execute commands with the specified php version.
> **Note:** If you also have php installed locally on your host machine (and it is the php version of your choice), there is no need to enter the php container, just execute all the required commands on your project dir.
To enter the php container, type the following in the devilbox root directory:
2017-05-06 09:12:54 +00:00
```shel
$ ./bash.sh
2017-05-06 09:12:54 +00:00
```
You can alternatively also enter as root:
2017-05-06 09:12:54 +00:00
```
$ ./root_bash.sh
2017-05-06 09:12:54 +00:00
```
#### 3.2 Find your project files
The `php` container mounts your project files (the path of `HOST_PATH_TO_WWW_DOCROOTS` as specified in the `.env` file) to `/shared/httpd`.
So enter the container as described above and once inside the `php` container cd into `/shared/httpd`.