Database

Drone supports several relational databases. If you don’t have a strong preference, SQLite is a great starting point. Once you have configured your database, continue onward to Create and Run a Drone Container

SQLite

Drone uses an embedded SQLite as the default database with zero configuration required. In order to customize the SQLite database configuration you should specify the following environment variables:

DATABASE_DRIVER=sqlite3
DATABASE_CONFIG=/var/lib/drone/drone.sqlite

Postgres

Configure a Postgres database backend:

DATABASE_DRIVER=postgres
DATABASE_CONFIG=postgres://root:[email protected]:5432/postgres?sslmode=disable

See the official postgres connection string documentation for a complete set of configuration options and examples.

MySQL

Configure a Mysql database backend:

DATABASE_DRIVER="mysql"
DATABASE_CONFIG="root:[email protected](localhost:3306)/drone?parseTime=true"

See the driver documentation for a complete set of configuration options and examples.

Note that Drone does not automatically create the mysql database. You should use the mysql command line utility or your preferred management console to create the database:

mysql -P 3306 --protocol=tcp -u root -e 'create database if not exists drone;'
This website is a public GitHub repository, which is forked from upstream Drone CI documentation. Please help us by forking and improving upstream Drone CI documentation or Tea CI documentation.