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

Commit 8b1a4a1

Browse files
meker12hguthrie
andauthored
Updated Cloud Docker container info and clean up markdown (#8216)
* Added documentation for TLS implementation change: * Added TLS docker image change from Centos to NGINX * Updated service containers table with TLS update and added missing Xdebug and MailHog containers * Added current info for mailhog and tls containers * Update src/cloud/docker/docker-containers-service.md * Updates based on review feedback and cleanup - Fix information about the `--tls-port` option. - Add missing options to Docker launch topics and clean up markdown - Clean up containers topic - Indicate node container is optional, table clean up Clean up service and cli containers topics - update node container description, fix TLS container description - Update the Xdebug topic with current local configuration for MailHog container Co-authored-by: hguthrie <hguthrie@users.noreply.github.com>
1 parent 4a2ec42 commit 8b1a4a1

9 files changed

+115
-78
lines changed

src/_includes/cloud/cloud-docker-config-generator-cmds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ php ./vendor/bin/ece-docker list
2121
```
2222

2323
{:.bs-callout-info}
24-
The `ece-docker build:compose` command runs in interactive mode and verifies the configured service versions. To skip interactive mode, use the `-n, --no-interaction` option.
24+
The `ece-docker build:compose` command runs in interactive mode and verifies the configured service versions. To skip interactive mode, use the `-n, --no-interaction` option. For more information about `ece-docker build:compose` command options, see [Service configuration options]({{site.baseurl}}/cloud/docker/docker-containers.html#service-configuration-options).

src/cloud/docker/docker-config.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,7 @@ echo "127.0.0.1 magento2.test" | sudo tee -a /etc/hosts
130130

131131
## Set up email
132132

133-
The default {{ site.data.var.mcd-prod }} configuration includes the [MailHog] service as a replacement for the Sendmail service. Sendmail can cause performance issues in the local Docker environment.
134-
135-
When the MailHog service is installed, go to the following URL to open the service and view outgoing emails: `http://magento2.docker:8025`
136-
137-
By default, MailHog listens on port 1025 for SMTP and port 8025 for the frontend dashboard and API. You can change the default ports using the `--mailhog-http-port` and `--mailhog-smtp-port` options.
138-
139-
```bash
140-
./vendor/bin/ece-docker build:compose --mailhog-smtp-port=1026 --mailhog-http-port=8026
141-
```
142-
143-
After updating the configuration and restarting the Docker environment, you can connect to the MailHog service from `http://magento2.docker:8026`, and use port 1026 for SMTP communication.
144-
145-
If you do not need the [MailHog] service, use the `--no-mailhog` option to generate the Docker compose configuration:
146-
147-
```bash
148-
./vendor/bin/ece-docker build:compose --no-mailhog
149-
```
133+
The default {{ site.data.var.mcd-prod }} configuration includes the [MailHog] service as a replacement for the Sendmail service. Sendmail can cause performance issues in the local Docker environment. See [MailHog service].
150134

151135
[php]: https://www.php.net/manual/en/install.php
152136
[Composer]: https://getcomposer.org
@@ -161,3 +145,4 @@ If you do not need the [MailHog] service, use the `--no-mailhog` option to gener
161145
[refresh]: {{site.baseurl}}/cloud/docker/docker-containers.html#rebuild-a-clean-environment
162146
[Docker Hub PHP Image Tag]: https://hub.docker.com/r/magento/magento-cloud-docker-php/tags
163147
[MailHog]: https://github.com/mailhog/MailHog
148+
[MailHog service]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#mailhog-container

src/cloud/docker/docker-containers-cli.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,15 @@ docker-compose run --rm build magento-command setup:static-content:deploy
6868

6969
The Cron container runs operations in the background immediately after the Docker environment starts. This container uses the cron configuration defined in the [`crons` property of the `.magento.app.yaml` file]({{ site.baseurl }}/cloud/project/magento-app-properties.html#crons). This container has no custom configuration.
7070

71+
{:.bs-callout-info}
72+
To improve overall performance in the local Docker environment, the Cron container is not present by default. You can use the following command to add the Cron container to the Cloud Docker environment: `./vendor/bin/ece-docker build:compose --mode="developer" --with-cron`
73+
7174
For details on managing cron jobs in the Cloud Docker environment, see [Manage cron jobs].
7275

7376
## Deploy container
7477

7578
**Container name**: deploy<br/>
76-
Docker base image: [magento/magento-cloud-docker-php], which is based on the [php] Docker image<br/>
79+
**Docker base image**: [magento/magento-cloud-docker-php], which is based on the [php] Docker image<br/>
7780

7881
The Deploy container mimics the Magento Cloud deploy process so that testing the build and deploy process is as close to testing in production as possible.
7982

@@ -90,6 +93,12 @@ docker-compose run --rm deploy magento-command index:reindex
9093

9194
The Node container is based on the [official Node Docker image][node]. You can use the container to install NPM dependencies, such as Gulp, or run any Node-based command line tools.
9295

96+
To add the Node container to the Docker environment, you must specify the Node version to install:
97+
98+
```bash
99+
./vendor/bin/ece-docker build:compose --node <version>
100+
```
101+
93102
[PHP-CLI version 7 image]: https://hub.docker.com/r/magento/magento-cloud-docker-php
94103
[magento/magento-cloud-docker-php]: https://hub.docker.com/r/magento/magento-cloud-docker-php
95104
[scripts]: https://github.com/magento/magento-cloud-docker/tree/develop/images/php/cli/bin
@@ -98,4 +107,4 @@ The Node container is based on the [official Node Docker image][node]. You can u
98107
[php]: https://hub.docker.com/_/php
99108
[node]: https://hub.docker.com/_/node
100109
[Manage cron jobs]: {{site.baseurl}}/cloud/docker/docker-manage-cron-jobs.html
101-
[ece-tools CLI]: {{site.baseurl}}/cloud/reference/ece-tools-reference.html
110+
[ece-tools CLI commands]: {{site.baseurl}}/cloud/reference/ece-tools-reference.html

src/cloud/docker/docker-containers-service.md

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Use the `--es-env-var` option to customize the Elasticsearch container when you
7070
php vendor/bin/ece-docker build:compose --es-env-var=ES_JAVA_OPTS="-Xms512m -Xmx512m" --es-env-var=node.store.allow_mmapfs=false
7171
```
7272

73-
See [Important Elasticsearch configuration][] in the Elasticsearch documentation for details about available configuration options.
73+
See [Important Elasticsearch configuration] in the Elasticsearch documentation for details about available configuration options.
7474

7575
{:.bs-callout-info}
7676
If your Cloud project uses Magento version 2.3.5 or earlier with MySQL search, add the `--no-es` option to skip the Elasticsearch container configuration when you generate the Docker Compose configuration file: `ece-docker build:compose --no-es`.
@@ -150,7 +150,29 @@ If you use the `docker-sync` or `mutagen` file synchronization options, the `php
150150

151151
You can add custom PHP extensions and manage their status from the `runtime` section of the `.magento.app.yaml` file. See [PHP extensions]. To test custom extensions without updating the {{site.data.var.ece}} environment configuration, you can add the custom configuration to the [`docker-compose.override.yml`][Docker override file]. Configuration settings in this file are applied only when you build and deploy to the Docker environment.
152152

153-
Optionally, you can add Xdebug to your Cloud Docker environment to debug your PHP code. See [Configure XDebug for Docker][].
153+
Optionally, you can add Xdebug to your Cloud Docker environment to debug your PHP code. See [Configure XDebug for Docker].
154+
155+
## MailHog container
156+
157+
**Container name**: mailhog<br/>
158+
**Docker base image**: [mailhog]<br/>
159+
**Ports**: SMTP:`1025`, HTTP:`8025`
160+
161+
The default Magento Cloud Docker configuration includes the MailHog service as a replacement for the Sendmail service. Sendmail can cause performance issues in the local Docker environment.
162+
163+
By default, MailHog listens on port 1025 for SMTP and port 8025 for the frontend dashboard and API (HTTP). You can change the default ports using the `--mailhog-http-port` and `--mailhog-smtp-port` options. When you build the Docker compose configuration, you can change the default ports:
164+
165+
```bash
166+
./vendor/bin/ece-docker build:compose --mailhog-smtp-port=1026 --mailhog-http-port=8026
167+
```
168+
169+
After updating the configuration and restarting the Docker environment, you can connect to the MailHog service from `http://magento2.docker:8026`, and use port 1026 for SMTP communication.
170+
171+
If needed, you can disable the MailHog service when you generate the Docker compose configuration:
172+
173+
```bash
174+
./vendor/bin/ece-docker build:compose --no-mailhog
175+
```
154176

155177
## RabbitMQ container
156178

@@ -193,11 +215,19 @@ The Test container, based on the [magento/magento-cloud-docker-php][php-cloud] D
193215
## TLS container
194216

195217
**Container name**: tls<br/>
196-
**Docker base image**: [magento/magento-cloud-docker-tls][tls], based on the [debian:jessie](https://hub.docker.com/_/debian) Docker image<br/>
197-
**Ports exposed**: `443`</br>
218+
**Docker base image**: [magento/magento-cloud-docker-nginx:1.19-1.2.0][tls]<br>
219+
**Ports**: `443` (default), `8080:80` (Varnish bypass)<br/>
198220

199221
The TLS termination proxy container facilitates the Varnish SSL termination over HTTPS.
200222

223+
- The default port for TLS communication is `443`.
224+
- If you have Varnish installed in the Docker environment, use port `8080:80` to bypass caching.
225+
- You can change the default port when you generate the Docker configuration file:
226+
227+
```bash
228+
./vendor/bin/ece-docker build:compose --tls-port <port-number>
229+
```
230+
201231
To increase the timeout on this container, add the following code to the `docker-compose.override.yml` file:
202232

203233
```yaml
@@ -210,7 +240,6 @@ To increase the timeout on this container, add the following code to the `docke
210240

211241
**Container name**: varnish<br/>
212242
**Docker base image**: [magento/magento-cloud-docker-varnish][varnish], based on the [centos] Docker image<br>
213-
**Ports exposed**: `80`<br/>
214243

215244
The Varnish container simulates Fastly and is useful for testing VCL snippets.
216245

@@ -219,7 +248,7 @@ The **Varnish** service is installed by default. When deployment completes, Mage
219248
In some cases, you might require a Docker environment without Varnish, for example to debug or run performance tests. You can generate the Docker Compose configuration without Varnish by adding the `--no-varnish` option to the `ece-docker build:compose` command.
220249

221250
```bash
222-
./vendor/bin/ece-docker build:compose --mode="developer" --php 7.2 --no-varnish
251+
./vendor/bin/ece-docker build:compose --mode="developer" --php <version> --no-varnish
223252
```
224253

225254
You can specify `VARNISHD_PARAMS` and other environment variables using ENV to specify custom values for required parameters. This is usually done by adding the configuration to the `docker-compose.override.yml` file.
@@ -280,6 +309,8 @@ To mount the custom index.php file using volumes:
280309
[Docker override file]: https://docs.docker.com/compose/extends/
281310
[FPM]: https://php-fpm.org
282311
[Important Elasticsearch configuration]: https://www.elastic.co/guide/en/elasticsearch/reference/6.5/important-settings.html
312+
[mailhog]: https://hub.docker.com/u/mailhog
313+
[MailHog service]: https://github.com/mailhog/MailHog
283314
[Manage the database]: {{site.baseurl}}/cloud/docker/docker-manage-database.html
284315
[mariadb Docker documentation]: https://hub.docker.com/_/mariadb
285316
[mariadb]: https://hub.docker.com/_/mariadb
@@ -291,7 +322,7 @@ To mount the custom index.php file using volumes:
291322
[rabbitmq]: https://hub.docker.com/_/rabbitmq
292323
[redis]: https://hub.docker.com/_/redis
293324
[Service configuration options]: {{site.baseurl}}/cloud/docker/docker-containers.html#service-configuration-options
294-
[tls]: https://hub.docker.com/r/magento/magento-cloud-docker-tls
325+
[tls]: https://hub.docker.com/r/magento/magento-cloud-docker-nginx
295326
[varnish]: https://hub.docker.com/r/magento/magento-cloud-docker-varnish
296327
[varnish]: https://hub.docker.com/r/magento/magento-cloud-docker-varnish
297328
[web config]: https://github.com/magento/docker

src/cloud/docker/docker-containers.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ The [`{{site.data.var.mcd-package}}` repository][docker-repo] contains build inf
1515

1616
The following CLI containers, most of which are based on a PHP-CLI version 7 Docker image, provide `magento-cloud` and `ece-tools` commands to perform file system operations and interact with the application:
1717

18-
| Name | Service | Key | Available Versions | Notes
18+
{: .docker-cli-container-table}
19+
| Name | Service | Key & options | Available Versions | Notes
1920
| ------------- | ---------- | ---------- | ------------------ |------------------
2021
| [build] | Build Container | none | none | PHP Container, runs build process
2122
| [deploy] | Deploy Container | none | none | PHP Container, runs the deploy process
22-
| [cron]| Cron Jobs | none | none | PHP Container, runs cron tasks
23-
| [node][node-container] | Node | `--node` | 6, 8, 10, 11 | Used gulp or other NPM based commands
23+
| [cron]| Cron Jobs | `--with-cron` | none | Optional PHP Container runs cron tasks
24+
| [node][node-container] | Node | `--node` | 6, 8, 10, 11 | Optional Node container used for gulp or other NPM-based commands
2425

2526
See [Docker CLI containers] for details.
2627

@@ -44,15 +45,17 @@ The following table shows the options to customize service container configurati
4445
| ------------- | ---------- | ---------- | ------------------ |------------------
4546
| [db] | MariaDB or MySQL<br> | `--db`, `--db-image` (MySQL)<br>`--expose-db-port`<br>`--db-increment`<br>`--db-offset`<br>`--with-entrypoint`<br>`--with-mariadb-config`|10.0, 10.1, 10.2<br>5.6, 5.7 | Use the increment and offset options to customize the [auto-increment settings][Using AUTO_INCREMENT] for replication.<br><br>Use the `--with-entrypoint` and `--with-mariadb-config` options to automatically configure database directories in the Docker environment<br><br>*Example build commands:*<br>`ece-docker build:compose --db <mariadb-version>`<br>`ece-docker build:compose --db <mysql-version> --db-image`
4647
| [elasticsearch] | Elasticsearch | `--es`<br>`--es-env-var`<br>`--no-es` | 1.7, 2.4, 5.2, 6.5, 6.8, 7.5, 7.6, 7.7 | Use the options to specify the Elasticsearch version, customize Elasticsearch configuration options, or to build a Docker environment without Elasticsearch.
47-
| [FPM][fpm-container] | PHP FPM | `--php`<br>`--with-xdebug` | 7.0, 7.1, 7.2, 7.3, 7.4 | Used for all incoming requests. Optionally, add Xdebug configuration to debug PHP code in the Docker environment.
48-
| [node][node-container] | Node | `--node` | 6, 8, 10, 11 | Used gulp or other NPM based commands
49-
| [rabbitmq][rabbitmq-container]| RabbitMQ | `--rmq` | 3.5, 3.7, 3.8 |
48+
| [fpm][fpm-container] | PHP FPM | `--php`<br>`--with-xdebug` | 7.0, 7.1, 7.2, 7.3, 7.4 | Used for all incoming requests. Optionally, install a specific php version or add Xdebug to debug PHP code in the Docker environment.
49+
| [fpm_xdebug][fpm_xdebug-container] | Xdebug | `--set-docker-host` | latest | Optional container for PHP debugging<br>On Linux systems, `--set-docker-host` sets the `.host.docker.internal` value in the container `/etc/hosts` file.
50+
| [mailhog][mailhog-container] | MailHog | `--no-mailhog`<br>`--mailhog-http-port`<br>`--mailhog-smtp-port` | latest | Email service to replace Sendmail service, which can cause issues in Docker environment
51+
| [node][node-container] | Node | `--node` | 6, 8, 10, 11 | Node container to run gulp or other NPM based commands in the Docker environment. Use the `--node` option to install a specific node version.
52+
| [rabbitmq][rabbitmq-container]| RabbitMQ | `--rmq` | 3.5, 3.7, 3.8 | Use the `--rmq` option to install a specific RabbitMQ version.
5053
| [redis][redis-container] | Redis | `--redis` | 3.2, 4.0, 5.0 | Standard redis container
5154
| [selenium][selenium-container]| Selenium | `--with-selenium`<br>`--selenium-version`<br>`--selenium-image`| Any | Enables Magento application testing using the Magento Functional Testing Framework (MFTF)
52-
| [test][test-container]| PHP CLI | `--with-test`| Any | Container with a writable file system for running tests
53-
| [tls][tls-container] | SSL Endpoint | | | Terminates SSL, can be configured to pass to varnish or nginx
54-
| [varnish][varnish-container] | Varnish | `--no-varnish` | 4, 6.2 | Varnish is provisioned by default. Use the `--no-varnish` option to skip Varnish service installation
55-
| [web][web-container] | NGINX | `--nginx` | 1.9, latest |
55+
| [test][test-container]| PHP CLI | `--with-test`| Any | Optional container with a writable file system for running tests
56+
| [tls][tls-container] | SSL Endpoint | `--tls-port` | nginx 1.19-1.2.0, latest | Terminates SSL, can be configured to pass to varnish or nginx. Use the `--tls-port` option to change the default port (443).
57+
| [varnish][varnish-container] | Varnish | `--no-varnish` | 4, 6.2 | Varnish is provisioned by default. Use the `--no-varnish` option to skip Varnish service installation.
58+
| [web][web-container] | NGINX | `--nginx` | 1.19-1.2.0, latest | Use the `--nginx` option to install a specific nginx version.
5659

5760
Use the following command to view all available options for the `ece-docker build:compose` command:
5861

@@ -153,9 +156,11 @@ Now you can see all requests that are passing through the TLS container and chec
153156
[File Synchronization]: {{site.baseurl}}/cloud/docker/docker-syncing-data.html
154157
[docker-repo]: https://github.com/magento/magento-cloud-docker
155158
[nginx]: https://hub.docker.com/r/magento/magento-cloud-docker-nginx
159+
[mailhog-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#mailhog-container
156160
[node-container]: {{site.baseurl}}/cloud/docker/docker-containers-cli.html#node-container
157161
[rabbitmq-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#rabbitmq-container
158162
[fpm-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#fpm-container
163+
[fpm_xdebug-container]: {{site.baseurl}}/cloud/docker/docker-development-debug.html
159164
[redis-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#redis-container
160165
[selenium-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#selenium-container
161166
[test-container]: {{site.baseurl}}/cloud/docker/docker-containers-service.html#test-container
@@ -174,3 +179,6 @@ Now you can see all requests that are passing through the TLS container and chec
174179
table.docker-service-versions-table td:nth-child(3) {
175180
width: 200px;
176181
}
182+
table.docker-cli-container-table td:nth-child(3) {
183+
width: 200px;
184+
}

src/cloud/docker/docker-development-debug.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,28 @@ If you use Microsoft Windows, take the following steps before continuing:
3535
This command adds the Xdebug configuration to your `docker-compose.yml` file.
3636

3737
```yaml
38-
fpm_xdebug:
39-
hostname: fpm_xdebug.magento2.docker
40-
image: 'magento/magento-cloud-docker-php:7.3-fpm-1.1'
41-
extends: generic
42-
ports:
43-
- '9001:9001'
44-
volumes:
45-
- 'mymagento-magento-sync:/app:nocopy'
46-
environment:
47-
- 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip redis xsl sodium'
48-
networks:
49-
magento:
50-
aliases:
51-
- fpm_xdebug.magento2.docker
52-
depends_on:
53-
db:
54-
condition: service_started
38+
fpm_xdebug:
39+
hostname: fpm_xdebug.magento2.docker
40+
image: 'magento/magento-cloud-docker-php:7.4-fpm-1.2.0'
41+
extends: generic
42+
volumes:
43+
- '.:/app:ro,delegated'
44+
- 'magento-vendor:/app/vendor:ro,delegated'
45+
- 'magento-generated:/app/generated:ro,delegated'
46+
- 'magento-var:/app/var:rw,delegated'
47+
- 'magento-app-etc:/app/app/etc:rw,delegated'
48+
- 'magento-pub-media:/app/pub/media:rw,delegated'
49+
- 'magento-pub-static:/app/pub/static:rw,delegated'
50+
- '.docker/mnt:/mnt:rw,delegated'
51+
environment:
52+
- 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium xdebug'
53+
networks:
54+
magento:
55+
aliases:
56+
- fpm_xdebug.magento2.docker
57+
depends_on:
58+
db:
59+
condition: service_started
5560
```
5661
{:.no-copy}
5762

0 commit comments

Comments
 (0)