Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
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
2 changes: 1 addition & 1 deletion src/_data/main-nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
url: /cloud/docker/docker-development.html
versionless: true

- label: Launch Docker
- label: Configure and launch Docker
url: /cloud/docker/docker-config.html
versionless: true

Expand Down
10 changes: 6 additions & 4 deletions src/_data/toc/cloud-guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,20 @@ pages:
- label: Manage cron jobs
url: /cloud/docker/docker-manage-cron-jobs.html
versionless: true

- label: Extend Docker
url: /cloud/docker/docker-extend.html
versionless: true

- label: Launch Docker
children:
- label: Developer mode
url: /cloud/docker/docker-mode-developer.html
versionless: true

- label: Production mode
url: /cloud/docker/docker-mode-production.html
versionless: true

- label: Extend Docker
url: /cloud/docker/docker-extend.html
versionless: true

- label: Functional Testing
children:
Expand Down
2 changes: 2 additions & 0 deletions src/_includes/cloud/note-docker-config-reference-link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{:.bs-callout-info}
See [Configure Docker]({{site.baseurl}}/cloud/docker/docker-config.html) for additional information about Docker prerequisites and using the Magento Cloud Docker environment.
17 changes: 9 additions & 8 deletions src/cloud/docker/docker-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,12 @@ The `ece-docker build:compose` command overwrites the existing `docker-compose.y

1. Optionally, [enable Xdebug].

## Launch modes
## Set the launch mode

_Mode_ is an additional configuration option for the Docker configuration generator (the `ece-docker build:compose` command). This mode option does not affect the Magento mode. It determines the {{site.data.var.ece}} file system installation and read-only or read-write behavior.
You can launch a Docker environment in production or developer mode by setting the `mode` option on the `ece-docker build:compose` command:

You can launch your Docker environment in one of the following modes:

- [**production**][prod-mode]—Production mode is the default configuration setting for launching the Docker environment with read-only filesystem permissions. This option builds the Docker environment in production mode and verifies configured service versions.
- [**developer**][dev-mode]—Developer mode supports an active development environment with full, writable filesystem permissions. This option builds the Docker environment in developer mode and verifies configured service versions. System performance is slower in developer mode because of additional file synchronization operations.
- **Production mode**—The `--mode="production"` setting supports an active production environment with read-only filesystem permissions. This is the default configuration setting for launching a Docker environment. Selecting this option builds the Docker environment in production mode and verifies configured service versions. See [Production mode launch instructions][prod-mode].
- **Developer mode**—The `--mode="developer"` setting supports an active development environment with full, writable filesystem permissions. Selecting this option builds the Docker environment in developer mode and verifies configured service versions. System performance is slower in developer mode because of additional file synchronization operations. See [Developer mode launch instructions][dev-mode].

For example, the following command starts the Docker configuration generator for the developer mode:

Expand All @@ -68,6 +66,9 @@ For example, the following command starts the Docker configuration generator for

To skip the interactive mode, use the `-n, --no-interaction` option.

{:.bs-callout-info}
The mode option for the `ece-docker build:compose` command does not affect the Magento mode. It determines the {{site.data.var.ece}} file system installation and read-only or read-write behavior.

## Stop and start containers

You can stop containers and restore them afterwards using the following methods.
Expand All @@ -89,7 +90,7 @@ Use the following command to stop and remove the Docker configuration:
{: .bs-callout-warning}
This command removes all components of your local Docker instance including containers, networks, volumes, and images except for the persistent database and the `magento-sync` volume. See [Rebuild a clean environment][refresh].

## Running Composer with Docker
## Run Composer with Docker

You can run composer using the `docker` command before you create the container instance. This technique is useful to create an application instance during the CI/CD build process, or even during first time Magento set up.

Expand All @@ -101,7 +102,7 @@ docker run -it -v $(pwd):/app/ -v ~/.composer/:/root/.composer/ magento/magento

This command passes in the current working directory as `/app/`, includes composer from `~/.composer/`, and runs the `composer install` command in the container. After this set up, the command fixes the permissions on the files that have been added or changed.

## Sendmail service
## Set up email

Send emails from your Docker environment by adding the following configuration to the `docker-compose.yml` configuration file:

Expand Down
2 changes: 2 additions & 0 deletions src/cloud/docker/docker-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ functional_areas:

{{site.data.var.ece}} provides a Docker environment option for those who use their local environment for development, test, or automation tasks. The {{site.data.var.ece}} Docker environment requires three, essential components: a {{site.data.var.ee}} v2 template, Docker Compose, and the {{site.data.var.ece}} `{{site.data.var.ct}}` package.

{%include cloud/note-docker-config-reference-link.md%}

## Host Operating Systems

The Cloud Docker environment supports Linux, macOS, and Windows operating systems. The containers should run on any Docker host, but some of the set up scripts require you to install PHP and Composer.
Expand Down
2 changes: 2 additions & 0 deletions src/cloud/docker/docker-mode-production.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ functional_areas:

Production mode is the default configuration setting for launching the Docker environment with read-only filesystem permissions. This option builds the Docker environment in production mode and verifies configured service versions.

{%include cloud/note-docker-config-reference-link.md%}

{:.procedure}
To launch the Docker environment in developer mode:

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

{%include cloud/note-docker-config-reference-link.md%}

## docker-compose

Action | Command
Expand Down Expand Up @@ -39,8 +41,8 @@ docker-compose -f docker-compose.yml -f docker-compose-custom.yml [-f more-custo

| Option | Key | Available values
| ------------ | ---------------- | ------------------
| [Mode]({{site.baseurl}}/cloud/docker/docker-config.html#launch-modes) | `--mode`, `-m` | production, developer
| [File synchronization engine]({{site.baseurl}}/cloud/docker/docker-config.html#launch-modes) | `--sync-engine` | native (default), docker-sync, mutagen
| [Mode]({{site.baseurl}}/cloud/docker/docker-config.html#set-the-launch-mode) | `--mode`, `-m` | production, developer
| [File synchronization engine]({{site.baseurl}}/cloud/docker/docker-syncing-data.html) | `--sync-engine` | native (default), docker-sync, mutagen

{:.bs-callout-info}
See [Service versions] for a list of the options to configure the software service version when building your {{site.data.var.mcd-prod}} environment.
Expand Down Expand Up @@ -80,3 +82,4 @@ Destroy containers | `down`
Destroy, re-create, and start containers | `up`

[Service versions]: {{site.baseurl}}/cloud/docker/docker-containers.html#service-containers
[Configure Docker]: {{site.baseurl}}/cloud/docker/docker-config.html
2 changes: 1 addition & 1 deletion src/cloud/reference/ece-tools-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Ideal state is configured
The `{{site.data.var.ct}}` package includes a dependency for the [magento/magento-cloud-patches] package, which delivers Magento patches and hot fixes that improve the integration of all {{site.data.var.ee}} versions with Cloud environments and supports quick delivery of critical fixes. The `{{site.data.var.mcp}}` also delivers custom patches that you add to your {{site.data.var.ece}} project. See [Apply patches].

<!-- link definitions -->
[mode]: {{site.baseurl}}/cloud/docker/docker-config.html#launch-modes
[mode]: {{site.baseurl}}/cloud/docker/docker-config.html#set-the-launch-mode
[hooks]: {{site.baseurl}}/cloud/project/project-conf-files_magento-app.html#hooks
[cloudvar]: {{site.baseurl}}/cloud/env/variables-cloud.html
[wizard]: {{site.baseurl}}/cloud/deploy/smart-wizards.html
Expand Down
4 changes: 2 additions & 2 deletions src/cloud/release-notes/cloud-release-archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ The `{{site.data.var.ct}}` 2002.0.22 release changes the structure of the `{{sit

- {:.new}<!-- MAGECLOUD-3345 -->**New Docker Image**—Added a Node.js image to support Gulp and other capabilities, such as Jasmine JS Unit Testing.

- {:.new}<!-- MAGECLOUD-3152/3511 -->**Docker build modes**—Now you can choose to launch the Docker environment in [Production mode or Developer mode]({{ site.baseurl }}/cloud/docker/docker-config.html#launch-modes). Developer mode supports active development with full, writable filesystem permissions.
- {:.new}<!-- MAGECLOUD-3152/3511 -->**Docker build modes**—Now you can choose to launch the Docker environment in [Production mode or Developer mode]({{ site.baseurl }}/cloud/docker/docker-config.html#set-the-launch-mode). Developer mode supports active development with full, writable filesystem permissions.

- {:.fix}<!-- MAGECLOUD-3369 -->Fixed an issue that caused Docker deploy to fail with a `Name or service not known` error if the cache is configured for a service that is not available. Now, you can remove a service from the [`.magento/services.yaml` file]({{ site.baseurl }}/cloud/project/project-conf-files_services.html). The Docker configuration generator updates the service in the `docker/config.php.dist` file automatically.

Expand Down Expand Up @@ -198,7 +198,7 @@ The `{{site.data.var.ct}}` version 2002.0.17 includes an important security patc

- <!-- MAGECLOUD-3025 -->Now, the default service configuration generated in the Docker environment is the same as the default configuration in the Cloud template.

- <!-- MAGECLOUD-2907 -->You can send mail from your Docker environment using the [`sendmail` service]({{ site.baseurl }}/cloud/docker/docker-config.html#sendmail-service).
- <!-- MAGECLOUD-2907 -->You can send mail from your Docker environment using the [`sendmail` service]({{ site.baseurl }}/cloud/docker/docker-config.html#set-up-email).

- <!-- MAGECLOUD-2891 -->Added the ability to [configure Xdebug]({{ site.baseurl }}/cloud/docker/docker-development-debug.html) to debug in the Cloud Docker environment.

Expand Down