Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 903dbcc

Browse files
shiftedrealityhguthrie
authored andcommittedMay 14, 2019
Improvements for Cloud Docker topic (#4512)
* Improvements * Fix formatting * fix sentence
·
2.4.51.x-eos
1 parent 820fc21 commit 903dbcc

File tree

1 file changed

+42
-3
lines changed

1 file changed

+42
-3
lines changed
 

‎guides/v2.1/cloud/docker/docker-config.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For example, the following command starts the Docker configuration generator for
5656

5757
You must have the following software installed on your local workstation:
5858

59-
- PHP version 7.0 or later
59+
- PHP version 7.1 or later
6060
- [php@7.1](https://formulae.brew.sh/formula/php@7.1)
6161
- [php@7.2](https://formulae.brew.sh/formula/php@7.2)
6262
- [Composer](https://getcomposer.org)
@@ -69,6 +69,20 @@ Before you begin, you must add the following hostname to your `/etc/hosts` file:
6969
127.0.0.1 magento2.docker
7070
```
7171

72+
Alternatively, you can run the following command to add it to the file:
73+
74+
```bash
75+
echo "127.0.0.1 magento2.docker" | sudo tee -a /etc/hosts
76+
```
77+
78+
### Stopping default Apache instance on Mac OS
79+
80+
Because Mac OS provides built-in Apache service, and may occupy port `80`, you must stop the service with the following command:
81+
82+
```bash
83+
sudo apachectl stop
84+
```
85+
7286
#### To launch Docker:
7387

7488
1. Download a Magento application template from the [Magento Cloud repository](https://github.com/magento/magento-cloud). Be careful to select the branch that corresponds with the Magento version.
@@ -140,7 +154,7 @@ Continue launching your Docker environment in the default _production_ mode.
140154
1. Configure and connect Varnish.
141155

142156
```bash
143-
docker-compose run deploy magento-command config:set system/full_page_cache/caching_application 2 -l
157+
docker-compose run deploy magento-command config:set system/full_page_cache/caching_application 2 --lock-env
144158
```
145159

146160
1. Clear the cache.
@@ -212,7 +226,7 @@ The `{{site.data.var.ct}}` version 2002.0.18 and later supports developer mode.
212226
1. Configure and connect Varnish.
213227

214228
```bash
215-
docker-compose run deploy magento-command config:set system/full_page_cache/caching_application 2 -l
229+
docker-compose run deploy magento-command config:set system/full_page_cache/caching_application 2 --lock-env
216230
```
217231

218232
1. Clear the cache.
@@ -240,6 +254,7 @@ Action | Command
240254
Suspend containers to continue your work later | `docker-compose stop`
241255
Start containers from a suspended state | `docker-compose start`
242256
Stop the synchronization daemon | `docker-sync stop`
257+
Start the synchronization daemon | `docker-sync start`
243258

244259
#### To stop and remove the Docker configuration:
245260

@@ -254,3 +269,27 @@ docker-compose down -v
254269
```bash
255270
docker-sync stop
256271
```
272+
273+
## Advanced usage
274+
275+
### Extending docker-compose.yml configuration
276+
277+
You can use Docker's built-in [extension mechanism](https://docs.docker.com/compose/reference/overview/#specifying-multiple-compose-files).
278+
279+
1. Create a `docker-compose-dev.yml` file inside your project's root directory and add the following content:
280+
281+
```yaml
282+
version: '2'
283+
services:
284+
deploy:
285+
environment:
286+
- ENABLE_SENDMAIL=true
287+
```
288+
289+
This replaces the default value of the `ENABLE_SENDMAIL` environment variable.
290+
291+
1. Pass both configuration files while executing your commands. For example:
292+
293+
```bash
294+
docker-compose -f docker-compose.yml -f docker-compose-dev.yml run deploy bash
295+
```

0 commit comments

Comments
 (0)
This repository has been archived.