dokku-mariadb is a plugin for dokku that provides PostgreSQL servers for your applications.
It uses the official MariadDB docker image (version 10).
This version is tested against dokku 0.3.17.
git clone https://github.com/krisrang/dokku-mariadb /var/lib/dokku/plugins/mariadbkr
dokku plugins-install
$ dokku help
mariadb:admin_console Launch a mariadb admin cli
mariadb:console <app> Launch a mariadb cli for <app>
mariadb:create <app> Create a mariadb database for <app>
mariadb:delete <app> Delete mariadb database for <app>
mariadb:url <app> Get DATABASE_URL for <app>
mariadb:dump <app> > <filename.dump> Dump <app> database to dump file
mariadb:restore <app> < <filename.*> Restore database to <app> 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
This plugin adds the following environment variables to your app via config vars (they are available via dokku config <app>
):
- DATABASE_URL
- MYSQL_URL
- DB_HOST
- DB_NAME
- DB_DB
- DB_USER
- DB_PASS
- DB_PORT
$ dokku mariadb:start # Server side
$ ssh dokku@server mariadb:start # Client side
$ dokku mariadb:stop # Server side
$ ssh dokku@server mariadb:stop # Client side
$ dokku mariadb:restart # Server side
$ ssh dokku@server mariadb:restart # Client side
$ dokku mariadb:create <app> # Server side
$ ssh dokku@server mariadb:create <app> # Client side
$ dokku mariadb:dump <app> > filename.dump # Server side
$ dokku mariadb:restore <app> < filename.dump # Server side
$ dokku mariadb:dump <app> | dokku mariadb:restore <app> # Server side
This plugin is based originally on the dokku-psql-single-container.
This plugin is released under the MIT license. See the file LICENSE.