You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
@@ -69,6 +69,20 @@ Before you begin, you must add the following hostname to your `/etc/hosts` file:
69
69
127.0.0.1 magento2.docker
70
70
```
71
71
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
+
72
86
#### To launch Docker:
73
87
74
88
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.
140
154
1. Configure and connect Varnish.
141
155
142
156
```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
144
158
```
145
159
146
160
1. Clear the cache.
@@ -212,7 +226,7 @@ The `{{site.data.var.ct}}` version 2002.0.18 and later supports developer mode.
212
226
1. Configure and connect Varnish.
213
227
214
228
```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
216
230
```
217
231
218
232
1. Clear the cache.
@@ -240,6 +254,7 @@ Action | Command
240
254
Suspend containers to continue your work later |`docker-compose stop`
241
255
Start containers from a suspended state |`docker-compose start`
242
256
Stop the synchronization daemon |`docker-sync stop`
257
+
Start the synchronization daemon |`docker-sync start`
243
258
244
259
#### To stop and remove the Docker configuration:
245
260
@@ -254,3 +269,27 @@ docker-compose down -v
254
269
```bash
255
270
docker-sync stop
256
271
```
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
0 commit comments