https://github.com/krisrang/dokku-mariadb
Plugin for dokku that provides a MariaDB server in a single container
https://github.com/krisrang/dokku-mariadb
Last synced: over 1 year ago
JSON representation
Plugin for dokku that provides a MariaDB server in a single container
- Host: GitHub
- URL: https://github.com/krisrang/dokku-mariadb
- Owner: krisrang
- License: mit
- Created: 2015-04-25T17:10:20.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-27T08:48:21.000Z (almost 11 years ago)
- Last Synced: 2025-02-20T22:13:55.078Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 156 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
dokku-mariadb [](https://travis-ci.org/krisrang/dokku-mariadb)
================
dokku-mariadb is a plugin for [dokku][dokku] that provides MariadDB servers for your applications.
It uses the official MariadDB docker image (version 10).
This version is tested against dokku 0.3.18.
## Installation
```
git clone https://github.com/krisrang/dokku-mariadb /var/lib/dokku/plugins/mariadbkr
dokku plugins-install
```
## Commands
```
$ dokku help
mariadb:admin_console Launch a mariadb admin cli
mariadb:console Launch a mariadb cli for
mariadb:create Create a mariadb database for
mariadb:delete Delete mariadb database for
mariadb:url Get DATABASE_URL for
mariadb:dump > Dump database to dump file
mariadb:restore < Restore database to from file
mariadb:list List all databases
mariadb:restart Restart the mariadb docker container
mariadb:start Start the mariadb docker container if it isn't running
mariadb:status Shows status of mariadb
mariadb:stop Stop the mariadb docker container
```
## Info
This plugin adds the following environment variables to your app via config vars (they are available via `dokku config `):
* DATABASE\_URL
* MYSQL\_URL
* DB\_HOST
* DB\_NAME
* DB\_DB
* DB\_USER
* DB\_PASS
* DB\_PORT
## Usage
### Start MariadDB:
```
$ dokku mariadb:start # Server side
$ ssh dokku@server mariadb:start # Client side
```
### Stop MariadDB:
```
$ dokku mariadb:stop # Server side
$ ssh dokku@server mariadb:stop # Client side
```
### Restart MariadDB:
```
$ dokku mariadb:restart # Server side
$ ssh dokku@server mariadb:restart # Client side
```
### Create a new database for an existing app:
```
$ dokku mariadb:create # Server side
$ ssh dokku@server mariadb:create # Client side
```
### Dump database:
```
$ dokku mariadb:dump > filename.dump # Server side
```
### Restore database from dump:
```
$ dokku mariadb:restore < filename.dump # Server side
```
### Copy database foo to database bar using pipe:
```
$ dokku mariadb:dump | dokku mariadb:restore # Server side
```
## Acknowledgements
This plugin is based originally on the [dokku-psql-single-container](https://github.com/Flink/dokku-psql-single-container).
## License
This plugin is released under the MIT license. See the file [LICENSE](LICENSE).
[dokku]: https://github.com/progrium/dokku