Skip to content
This repository was archived by the owner on Mar 15, 2019. It is now read-only.

Commit eea2772

Browse files
author
gulien
authored
Update README.md
1 parent 84f5e23 commit eea2772

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

README.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img src="./logo.png" alt="kickoff-docker-php logo" width="300" height="300" />
2+
<img src="./logo.png" alt="kickoff-docker-php logo" width="200" height="200" />
33
</div>
44

55
<h1 align="center">kickoff-docker-php</h1>
@@ -15,19 +15,17 @@
1515

1616
<br>
1717

18-
# Goal
19-
20-
This project will help you to setup a PHP project with Docker, thanks to some useful make commands.
18+
This project will help you to setup a **PHP project with Docker**, thanks to some useful make commands.
2119

2220
Think of it as a starter kit and update it at your convenience.
2321

24-
# Prerequisites
22+
## Prerequisites
2523

2624
Docker (**>= 1.12**) for MacOS / Linux: https://docs.docker.com/engine/installation
2725

2826
Docker Compose (**>= 1.8.0**) for MacOS / Linux: https://docs.docker.com/compose/install
2927

30-
# Quick start
28+
## Quick start
3129

3230
**Important for Linux users:** make sure you're not using `root` user. Your current user must be part of `sudo` and `docker` groups.
3331

@@ -63,7 +61,7 @@ The installation might take some time, so go for a coffee break! :coffee:
6361

6462
Once everything has been installed, open your favorite web browser and copy / paste http://dev.yourproject.com and check if everything is OK!
6563

66-
# Make commands
64+
## Make commands
6765

6866
| Command | Description |
6967
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -86,9 +84,9 @@ Once everything has been installed, open your favorite web browser and copy / pa
8684
| tail-nginx | Displays the Docker's logs of the NGINX container. |
8785
| tail-mysql | Displays the Docker's logs of the MySQL container. |
8886

89-
# Dive in
87+
## Dive in
9088

91-
## How does it work?
89+
### How does it work?
9290

9391
There are three important files:
9492

@@ -103,7 +101,7 @@ As these files are templates, they are not used directly. That's why you have to
103101

104102
For security concern, these three files have been added in the `.gitignore` file as they contain sensible data like the MySQL database password and so on.
105103

106-
## Project structure
104+
### Project structure
107105

108106
This project will run three containers:
109107

@@ -118,25 +116,25 @@ This project will run three containers:
118116
* The `apache/volume` folder is where your source code must be located. It is mapped with the `/var/www/html` folder on the Apache container.
119117
* The `mysql/volume` has been created by the MySQL container. It is where your database is persisted on the host.
120118

121-
## Link your PHP application to your MySQL database
119+
### Link your PHP application to your MySQL database
122120

123121
It is actually quite simple. In your Apache container, the hostname of the MySQL database is equal to the variable's value `MYSQL_SERVICE_NAME` defined in the `.env` file. Also, just use the port `3306` and the credentials defined in the `.env` file.
124122

125-
## Manage your database
123+
### Manage your database
126124

127125
The simplest way is to access directly to the MySQL cli using `make mysql-cli`.
128126

129127
If you want to manage your database with a more powerful tool (like MySQL Workbench), open your `.env` file in your favorite editor, set the variable `MYSQL_ENABLE_PORTS_MAPPING=1`, update if needed the variable `MYSQL_HOST_PORT_TO_MAP` and finally run `make kickoff`.
130128

131129
You are now able to access on your host to your MySQL database using `127.0.0.1` and the port defined in the variable `MYSQL_HOST_PORT_TO_MAP`. See also: [Use MySQL Workbench to manage your database](docs/mysql_workbench.md)
132130

133-
## Xdebug support
131+
### Xdebug support
134132

135133
Open your `.env` file in your favorite editor, set the variable `APACHE_ENABLE_XDEBUG=1` and run `make kickoff`.
136134

137135
It will enable Xdebug on the Apache container. See also: [Use Xdebug with PhpStorm](docs/xdebug.md)
138136

139-
## SSL support
137+
### SSL support
140138

141139
Open your `.env` file in your favorite editor, set the variable `NGINX_ENABLE_SSL=1` and run `make kickoff`.
142140

@@ -146,25 +144,25 @@ You will find more information on how to make SSL work here: https://github.com/
146144

147145
If you're using SSL Certificate Chains, we advise you to read the official NGINX documentation: https://www.nginx.com/resources/admin-guide/nginx-ssl-termination/#cert_chains
148146

149-
## Multiple environments/projects on the same host
147+
### Multiple environments/projects on the same host
150148

151149
As you long as each `NGINX_PROXY_NAME` and `PROXY_NETWORK` variables in your `.env` files have the same values, you are able to run as many environments/projects as you need.
152150

153151
Make sure that you have defined a different `APACHE_VIRTUAL_HOST` value for each of your Apache containers.
154152

155-
## Install more PHP extensions
153+
### Install more PHP extensions
156154

157155
Open the `Dockerfile` located in the `apache/volume` folder and [follow the official instructions](https://github.com/docker-library/docs/tree/master/php#how-to-install-more-php-extensions).
158156

159157
Once done, run `make kickoff` to rebuild your Apache container.
160158

161-
# Candies
159+
## Candies
162160

163161
* [Install a Postfix container](docs/postfix.md)
164162
* [Install Gulp](docs/gulp.md)
165163
* [Install Mouf framework](docs/mouf_framework.md)
166164

167-
# FAQ / Known issues
165+
## FAQ / Known issues
168166

169167
**Should I use this in production?**
170168

@@ -182,6 +180,6 @@ Yep, this seems to be a current limitation of Docker on MacOS (see [#8076](https
182180

183181
Add the `xdebug.idekey` variable with your corresponding value in the `ext-xdebug.ini` file. You might also have to update the `xdebug.remote_host` variable's value with the IP address of your container (`docker inspect YOUR_APACHE_CONTAINER_NAME`).
184182

185-
# Credits
183+
## Credits
186184

187185
* Icon by Nikita Kozin from the Noun Project

0 commit comments

Comments
 (0)