Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jordanbrauer/deployer-mysql
An unofficial Deployer recipe containing a set of useful tasks for interacting with MySQL locally & remotely.
https://github.com/jordanbrauer/deployer-mysql
composer deploy deployer deployer-recipes deployment mysql php recipes task-runner
Last synced: 2 months ago
JSON representation
An unofficial Deployer recipe containing a set of useful tasks for interacting with MySQL locally & remotely.
- Host: GitHub
- URL: https://github.com/jordanbrauer/deployer-mysql
- Owner: jordanbrauer
- License: mit
- Created: 2017-10-18T03:01:29.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-18T17:09:47.000Z (about 7 years ago)
- Last Synced: 2024-10-11T16:13:44.697Z (3 months ago)
- Topics: composer, deploy, deployer, deployer-recipes, deployment, mysql, php, recipes, task-runner
- Language: PHP
- Size: 3.91 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deployer-mysql
An unofficial [Deployer](https://github.com/deployphp/deployer) recipe containing a set of useful tasks for interacting with MySQL locally & remotely.
## Usage
### Installation
Install via Composer as a dev' dependency to your project.
```shell
$ composer require --dev jordanbrauer/deployer-mysql
```### Basic Setup
Add the following to your deployer config;
```php
require_once "mysql.php";set("mysql", array(
"host" => "localhost",
"port" => 3306,
"schema" => "your_database_name",
"username" => "root",
"password" => "root",
"dump_file" => "path/to/your/dump/file.sql",
));
```### Additional Setup
If you want to add options (flags) to your `mysqldump` command task, you can do so by adding the "`dump_options`" key to the configuration array, like so;
```php
set("mysql", array(
// ...
"dump_options" => array(
"--skip-comments",
),
));
```Each option you want to add must be a new entry in the array.
_**Note:** the_ `--skip-comments` _option is the only default option set. So, if you don't have any other options for your setup, you can omit this configuration key entirely._