@@ -10,7 +10,6 @@ This environment provies the following tools to develop in PHP :
1010
1111Available version :
1212
13- - `5.6`
1413 - `7.0`
1514 - `7.1`
1615 - `7.2`
@@ -64,6 +63,36 @@ All of them are in Alpine version
6463
6564- [ NodeJs] ( https://nodejs.org/en ) : JavaScript runtime
6665
66+ #### Makefile
67+
68+ A ` Makefile ` is available in command line to manage several actions.
69+
70+ Type following command to display help :
71+
72+ ``` shell
73+ make
74+ ```
75+
76+ or
77+
78+ ``` shell
79+ make help
80+ ```
81+
82+ Output:
83+
84+ ``` shell
85+ help: Show this help
86+ servers: Start all containers
87+ start: Start all containers
88+ stop: Stop all containers
89+ restart: Restart all containers
90+ certificate: Generate a SSL certificate
91+ renewal: Renewal a knowed SSL certificate
92+ install: Install EnvDev container environment
93+ homepage: Launch EnvDev homepage in default browser
94+ ```
95+
6796### Optional tools
6897
6998Optional tools are available to use in EnvDev. They are not included by default but can be added easily.
@@ -106,6 +135,12 @@ To start the environment, type the following command:
106135make servers
107136```
108137
138+ or
139+
140+ ``` shell
141+ make start
142+ ```
143+
109144Several containers are created from ` .env ` configuration:
110145
111146| Description | Container's name |
@@ -185,6 +220,56 @@ In `conf/apache/vhosts` directory, all your `yourhost.conf` file. A default host
185220</VirtualHost>
186221```
187222
223+ ### SSL support
224+
225+ The SSL support is possible during development. To activate it on one of your vhosts, you must follow steps:
226+
227+ - Create the SSL self-signed certificate
228+
229+ you can use the command:
230+
231+ ``` shell
232+ make certificate
233+ ```
234+
235+ - Add the activation of SSL in VHost file
236+
237+ On Nginx:
238+
239+ ```
240+ listen 443 ssl;
241+
242+ ssl_certificate /etc/nginx/ssl/envdev.crt;
243+ ssl_certificate_key /etc/nginx/ssl/envdev.key;
244+ ```
245+
246+ On Apache:
247+
248+ ```
249+ <VirtualHost *:80 *:443>
250+ ...
251+
252+ SSLEngine on
253+ SSLCertificateFile /usr/local/apache2/conf/custom/envdev.crt
254+ SSLCertificateKeyFile /usr/local/apache2/conf/custom/envdev.key
255+
256+ ...
257+ ```
258+
259+ where ` envdev ` is the name chosen during the step of the certificate creation.
260+
261+ Don't forget to restart ` web ` container to restart the web server
262+
263+ ``` shell
264+ docker restart web
265+ ```
266+
267+ Tips: If you certificate is out of date, you can renew it with the command:
268+
269+ ``` shell
270+ make renewal
271+ ```
272+
188273## Configuration
189274
190275You can create ` .env ` file to manage applications and tools.
@@ -194,11 +279,12 @@ The following versions, paths and ports can be configured :
194279
195280| Description | Variable name | Possible values | Default |
196281| :-------------| :---------------:| :-----------------:| :---------:|
197- | PHP Version | PHP_VERSION | ` 5.6 ` , ` 7.0 ` , ` 7.1 ` , ` 7.2 ` | ` 7.2 ` |
282+ | PHP Version | PHP_VERSION | ` 7.0 ` , ` 7.1 ` , ` 7.2 ` | ` 7.2 ` |
198283| Database type | DB | ` mariadb ` , ` mysql ` , ` mongodb ` | ` mysql ` |
199284| Cache server type | CACHE_SERVER | ` redis ` , ` memcached ` | ` redis ` |
200285| Projects Path | PROJECTS_PATH | any | ` /your/projects/directory/path ` |
201286| HTTP web port | WEB_PORT | any | ` 80 ` |
287+ | HTTPS web port | WEBSSL_PORT | any | ` 443 ` |
202288| MailDev port | MAILDEV_PORT | any | ` 1080 ` |
203289| PHPMyAdmin port | PHPMYADMIN_PORT | any | ` 9090 ` |
204290| MongoExpress port | MONGOEXPRESS_PORT | any | ` 8081 ` |
0 commit comments