|
@@ -205,7 +205,7 @@ bin/composer install
|
|
bin/copyfromcontainer vendor
|
|
bin/copyfromcontainer vendor
|
|
|
|
|
|
# Import existing database:
|
|
# Import existing database:
|
|
-bin/clinotty mysql -hdb -umagento -pmagento magento < existing/magento.sql
|
|
|
|
|
|
+bin/mysql < backups/magento.sql
|
|
|
|
|
|
# Update database connection details to use the above Docker MySQL credentials:
|
|
# Update database connection details to use the above Docker MySQL credentials:
|
|
# Also note: creds for the MySQL server are defined at startup from env/db.env
|
|
# Also note: creds for the MySQL server are defined at startup from env/db.env
|
|
@@ -262,7 +262,8 @@ You'll now have an updated `bin/update` helper script, and can run it to update
|
|
- `bin/fixperms`: This will fix filesystem permissions within the container.
|
|
- `bin/fixperms`: This will fix filesystem permissions within the container.
|
|
- `bin/grunt`: Run the grunt binary. Ex. `bin/grunt exec`
|
|
- `bin/grunt`: Run the grunt binary. Ex. `bin/grunt exec`
|
|
- `bin/magento`: Run the Magento CLI. Ex: `bin/magento cache:flush`
|
|
- `bin/magento`: Run the Magento CLI. Ex: `bin/magento cache:flush`
|
|
-- `bin/mysql`: Run the MySQL CLI with database config from env/db.env. Ex `bin/mysql -e "EXPLAIN core_config_data"`
|
|
|
|
|
|
+- `bin/mysql`: Run the MySQL CLI with database config from `env/db.env`. Ex. `bin/mysql -e "EXPLAIN core_config_data"` or`bin/mysql < backups/magento.sql`
|
|
|
|
+- `bin/mysqldump`: Backup the Magento database. Ex. `bin/mysqldump > backups/magento.sql`
|
|
- `bin/n98-magerun2`: Access the n98 magerun CLI. Ex: `bin/n98-magerun2 dev:console`
|
|
- `bin/n98-magerun2`: Access the n98 magerun CLI. Ex: `bin/n98-magerun2 dev:console`
|
|
- `bin/node`: Run the node binary. Ex. `bin/node --version`
|
|
- `bin/node`: Run the node binary. Ex. `bin/node --version`
|
|
- `bin/npm`: Run the npm binary. Ex. `bin/npm install`
|
|
- `bin/npm`: Run the npm binary. Ex. `bin/npm install`
|
|
@@ -291,16 +292,22 @@ You'll now have an updated `bin/update` helper script, and can run it to update
|
|
|
|
|
|
The hostname of each service is the name of the service within the `docker-compose.yml` file. So for example, MySQL's hostname is `db` (not `localhost`) when accessing it from within a Docker container. Elasticsearch's hostname is `elasticsearch`.
|
|
The hostname of each service is the name of the service within the `docker-compose.yml` file. So for example, MySQL's hostname is `db` (not `localhost`) when accessing it from within a Docker container. Elasticsearch's hostname is `elasticsearch`.
|
|
|
|
|
|
-Here's an example of how to connect to the MySQL cli tool of the Docker instance:
|
|
|
|
|
|
+To connect to the MySQL CLI tool of the Docker instance, run:
|
|
|
|
|
|
```
|
|
```
|
|
-bin/cli mysql -h db -umagento -pmagento magento
|
|
|
|
|
|
+bin/mysql
|
|
```
|
|
```
|
|
|
|
|
|
-You can use the `bin/clinotty` helper script to import a database. This example uses the root MySQL user, and looks for the `dbdump.sql` file in your local host directory:
|
|
|
|
|
|
+You can use the `bin/mysql` script to import a database, for example a file stored in your local host directory at `backups/magento.sql`:
|
|
|
|
|
|
```
|
|
```
|
|
-bin/clinotty mysql -h db -u root -pmagento magento < dbdump.sql
|
|
|
|
|
|
+bin/mysql < backups/magento.sql
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+You also can use `bin/mysqldump` to export the database. The file will appear in your local host directory at `backups/magento.sql`:
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+bin/mysqldump > backups/magento.sql
|
|
```
|
|
```
|
|
|
|
|
|
### Composer Authentication
|
|
### Composer Authentication
|