From 260784b0f75984942411759890866e0c45ac89e9 Mon Sep 17 00:00:00 2001 From: Oleh Posyniak Date: Mon, 20 May 2019 14:16:53 -0500 Subject: [PATCH] MAGECLOUD-3569: Improve UX by adding scripts --- guides/v2.1/cloud/docker/docker-config.md | 8 ++++---- guides/v2.1/cloud/docker/docker-database.md | 6 +++--- .../v2.1/cloud/docker/docker-development-debug.md | 2 +- guides/v2.1/cloud/docker/docker-development.md | 6 +++--- guides/v2.1/cloud/docker/docker-quick-reference.md | 14 ++++++++++++++ 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/guides/v2.1/cloud/docker/docker-config.md b/guides/v2.1/cloud/docker/docker-config.md index 845d7e13c41..bc39d1f7231 100644 --- a/guides/v2.1/cloud/docker/docker-config.md +++ b/guides/v2.1/cloud/docker/docker-config.md @@ -96,7 +96,7 @@ Continue launching your Docker environment in the default _production_ mode. 1. _Optional_: Copy the raw configuration files. ```bash - cp docker/config.php.dist docker/config.php + cp .docker/config.php.dist .docker/config.php ``` 1. _Optional_: Convert the PHP configuration files to Docker ENV files. @@ -107,7 +107,7 @@ Continue launching your Docker environment in the default _production_ mode. This command generates the following Docker ENV files: - * `docker/config.env` + * `.docker/config.env` {: .bs-callout .bs-callout-info} The `{{site.data.var.ct}}` version 2002.0.12 package does not support the `docker:config:convert` command. @@ -170,7 +170,7 @@ The `{{site.data.var.ct}}` version 2002.0.18 and later supports developer mode. 1. _Optional_: Copy the raw configuration files. ```bash - cp docker/config.php.dist docker/config.php + cp .docker/config.php.dist .docker/config.php ``` 1. _Optional_: Convert the PHP configuration files to Docker ENV files. @@ -181,7 +181,7 @@ The `{{site.data.var.ct}}` version 2002.0.18 and later supports developer mode. This command generates the following Docker ENV files: - * `docker/config.env` + * `.docker/config.env` 1. _Optional_: Configure the Docker global variables in the `docker-compose.yaml` file. For example, you can [enable and configure Xdebug]({{ page.baseurl }}/cloud/docker/docker-development-debug.html). diff --git a/guides/v2.1/cloud/docker/docker-database.md b/guides/v2.1/cloud/docker/docker-database.md index 9b6b516b289..fdb87089e41 100644 --- a/guides/v2.1/cloud/docker/docker-database.md +++ b/guides/v2.1/cloud/docker/docker-database.md @@ -7,9 +7,9 @@ functional_areas: - Configuration --- -There are two ways to connect to the database. Before you begin, you can find the database credentials in the `database` section of the `docker/config.php` file. The examples use the following default credentials: +There are two ways to connect to the database. Before you begin, you can find the database credentials in the `database` section of the `.docker/config.php` file. The examples use the following default credentials: -> Filename: `docker/config.php` +> Filename: `.docker/config.php` ```php?start_inline=1 return [ @@ -85,4 +85,4 @@ return [ | 10.0.38-MariaDB-1~xenial | +--------------------------+ ``` - {: .no-copy} \ No newline at end of file + {: .no-copy} diff --git a/guides/v2.1/cloud/docker/docker-development-debug.md b/guides/v2.1/cloud/docker/docker-development-debug.md index c227aa22cbd..f03a41b1746 100644 --- a/guides/v2.1/cloud/docker/docker-development-debug.md +++ b/guides/v2.1/cloud/docker/docker-development-debug.md @@ -33,7 +33,7 @@ generic: - PHP_IDE_CONFIG=serverName=magento_cloud_docker - XDEBUG_CONFIG=remote_host=host.docker.internal env_file: - - ./docker/config.env + - ./.docker/config.env ``` You can change any Xdebug configuration using the`XDEBUG_CONFIG` option. For example, to change the `xdebug.remote_port` option: diff --git a/guides/v2.1/cloud/docker/docker-development.md b/guides/v2.1/cloud/docker/docker-development.md index 19e481147aa..a4453b1a0d7 100644 --- a/guides/v2.1/cloud/docker/docker-development.md +++ b/guides/v2.1/cloud/docker/docker-development.md @@ -76,11 +76,11 @@ The database container is based on the `mariadb:10` image. #### To import a database dump: -Place the SQL file into the `docker/mysql/docker-entrypoint-initdb.d` folder. +Place the SQL file into the `.docker/mysql/docker-entrypoint-initdb.d` folder. The `{{site.data.var.ct}}` package imports and processes the SQL file the next time you build and start the Docker environment using the `docker-compose up` command. -Although it is a more complex approach, you can use GZIP by _sharing_ the `.sql.gz` file using the `docker/mnt` directory and importing it inside the Docker container. +Although it is a more complex approach, you can use GZIP by _sharing_ the `.sql.gz` file using the `.docker/mnt` directory and importing it inside the Docker container. ## Varnish container @@ -90,7 +90,7 @@ The TLS termination proxy container, based on the [magento/magento-cloud-docker ## Sharing data between host machine and container -You can share files easily between your machine and a Docker container by placing the files in the `docker/mnt` directory. You can find the files in the `/mnt` directory the next time you build and start the Docker environment using the `docker-compose up` command. +You can share files easily between your machine and a Docker container by placing the files in the `.docker/mnt` directory. You can find the files in the `/mnt` directory the next time you build and start the Docker environment using the `docker-compose up` command. ## Sendmail service diff --git a/guides/v2.1/cloud/docker/docker-quick-reference.md b/guides/v2.1/cloud/docker/docker-quick-reference.md index 7ef7387abe2..8e53e99b810 100644 --- a/guides/v2.1/cloud/docker/docker-quick-reference.md +++ b/guides/v2.1/cloud/docker/docker-quick-reference.md @@ -50,3 +50,17 @@ php ./vendor/bin/ece-tools list | grep docker | ------------ | ---------------- | ------------------ | Mode | `--mode`, `-m` | production, developer +## bin/docker + +Action | Command +:----- | :------ +Pull latest images | pull +Destroy, re-create and start containers | up +Destroy containers | down +Build application | build +Deploy application | up +Re-build and re-deploy application | redeploy +Connect to bash | bash +Stop containers | stop +Start containers | start +Restart containers | restart