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

Update Docker command help #8197

Merged
merged 2 commits into from
Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/_includes/cloud/cloud-docker-config-generator-cmds.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ You use the following commands to generate the Docker configuration files and bu

Action | Command
:----- | :------
Builds the Docker environment in [production mode][mode] by default and verifies configured service versions. | `ece-docker build:compose`
Builds the docker environment in [developer mode][mode]. | `ece-docker build:compose --mode="developer"`
Builds the docker environment in [production mode][mode]. |`ece-docker build:compose --mode="production"`
Convert PHP configuration files to Docker ENV files. | `ece-docker image:generate:php`
Builds the Docker environment in [production mode][mode] by default and verifies configured service versions. | `./vendor/bin/ece-docker build:compose`
Builds the docker environment in [developer mode][mode]. | `./vendor/bin/ece-docker build:compose --mode="developer"`
Builds the docker environment in [production mode][mode]. |`.vendor/bin/ece-docker build:compose --mode="production"`
Convert PHP configuration files to Docker ENV files. | `.vendor/bin/ece-docker image:generate:php`
Builds a custom `docker-compose.yaml` file | `./vendor/bin/ece-docker build:custom:compose`

For example, the following command starts the Docker configuration generator in developer mode and specifies PHP version 7.2:

Expand Down
79 changes: 72 additions & 7 deletions src/cloud/docker/docker-quick-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ functional_areas:

## Docker Compose

Docker Compose is a tool for defining and running multi-container Docker applications. The following table lists the Docker Compose commands for building, deploying, and operating {{site.data.var.mcd-prod}}. You can also use [Magento Cloud Docker CLI](#magento-cloud-docker-cli) commands to complete Docker Compose tasks.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Docker Compose is a tool for defining and running multi-container Docker applications. The following table lists the Docker Compose commands for building, deploying, and operating {{site.data.var.mcd-prod}}. You can also use [Magento Cloud Docker CLI](#magento-cloud-docker-cli) commands to complete Docker Compose tasks.
Docker Compose is a tool for defining and running multi-container Docker applications. The following table lists the `docker-compose` commands for building, deploying, and operating {{site.data.var.mcd-prod}}. You can use [Magento Cloud Docker CLI](#magento-cloud-docker-cli) commands to complete Docker Compose tasks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this is a reference or cheatsheet. The original intent was something quick without much dialog. The link may not be necessary.


Action | Command
:----- | :------
Build and start Docker environment | `docker-compose up -d`
Expand Down Expand Up @@ -46,15 +48,68 @@ docker-compose -f docker-compose.yml -f docker-compose-custom.yml [-f more-custo

### Additional build options

| Option | Key | Available values
| ------------ | ---------------- | ------------------
| [Mode][] | `--mode`, `-m` | production, developer
| [File synchronization engine][] | `--sync-engine` | native (default), docker-sync, mutagen
| Specify a custom URL for Magento | `--host`<br>`--port`
| Specify custom HTTP and SMTP ports for MailHog | `--mailhog-http-port`<br>`--mailhog-smtp-port`
View the available options for the `ece-docker build:compose` command:

```bash
php ./vendor/bin/ece-docker build:compose -h
```

```terminal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not display the output from a help command here for a couple of reasons. First, it's a quick reference or a cheat sheet. Just a place to remind people about certain commands. Second, a help list of this size might be a maintenance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My plan is to automate the output for all of the CLI commands. I put this here because the service-versions table is hard to maintain, and there are many options that are not included there.

Description:
Build docker configuration

Usage:
build:compose [options]

Options:
--php=PHP PHP version
--nginx=NGINX Nginx version
--db=DB DB version
--db-image=DB-IMAGE DB image
--expose-db-port=EXPOSE-DB-PORT Expose DB port
--expose-db-quote-port=EXPOSE-DB-QUOTE-PORT Expose port for DB sales
--expose-db-sales-port=EXPOSE-DB-SALES-PORT Expose port for DB quote
--with-entrypoint Add DB entrypoint volume
--with-mariadb-conf Add MariaDb config volume
--redis=REDIS Redis version
--es=ES Elasticsearch version
--rmq=RMQ RabbitMQ version
--node=NODE Node.js version
--selenium-version=SELENIUM-VERSION Selenium version
--selenium-image=SELENIUM-IMAGE Selenium image
--no-es Disable Elasticsearch
--no-mailhog Disable MailHog
--mailhog-http-port Custom HTTP port for MailHog
--mailhog-smtp-port Custom SMTP port for MailHog
--set-docker-host Sets host.docker.internal for fpm_xdebug container to
resolve debug issue for LINUX system
-m, --mode=MODE Mode of environment (developer, production)
--sync-engine=SYNC-ENGINE File sync engine. Works only with developer mode. Available: (docker-sync, mutagen, native)
--with-cron Add cron container
--no-varnish Remove Varnish container
--with-selenium Add Selenium latest version
--with-test Add container for running tests
--no-tmp-mounts Remove /tmp mounted volume
--with-xdebug Enables XDebug
--env-vars[=ENV-VARS] Cloud environment variables
--installation-type[=INSTALLATION-TYPE] Sets magento installation type [default: "composer"]
--host[=HOST] Host name
--port[=PORT] Port
--tls-port TLS port
--es-env-var=ES-ENV-VAR Environment variable for elasticsearch service (multiple values allowed)
--db-increment-increment=DB-INCREMENT-INCREMENT "auto_increment_increment" database variable
--db-increment-offset=DB-INCREMENT-OFFSET "auto_increment_offset" database variable
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

{:.bs-callout-info}
See [Service versions] for a list of service configuration options you can add to the `ece-docker build:compose` command to customize the Cloud Docker environment configuration.
See [Service versions] for additional information about the service configuration options for the `ece-docker build:compose` command.

## Magento Cloud Docker CLI

Expand Down Expand Up @@ -92,6 +147,16 @@ Start containers | `./bin/magento-docker start`
Restart containers | `./bin/magento-docker restart`
Destroy containers | `./bin/magento-docker down`
Destroy, re-create, and start containers | `./bin/magento-docker up`
Clears Redis cache | `./bin/magento-docker flush-redis`
Clears Varnish cache | `./bin/magento-docker flush-varnish`
Access database | `./bin/magento-docker ece-db`
Run a command in a PHP container<br>Supports the following values for the PHP version: 7.1, 7.2, 7.3, 7.4| `./bin/magento-docker php <version>`

Use the following command to view the magento-docker CLI command help:

```bash
./bin/magento-docker -h
```

<!--Link definitions-->

Expand Down