Drone requires the use of a database backend for persistence. Drone uses an embedded sqlite database by default, which does not require any additional configuration. This article provides a basic overview of alternate database configurations.
Drone supports mysql 5.6 and higher as the database engine. The below example demonstrates mysql database configuration. Please reference the official driver documentation for connection string configuration details.
Drone supports postgres 9.6 and higher as the database engine. The below example demonstrates postgres database configuration. Please reference the official driver documentation for connection string configuration details.
Drone supports aesgcm encryption of secrets stored in the database. You must enable encryption before any secrets are stored in the database.
Create an encryption key:
$ openssl rand -hex 16 0c549fd39ae397333761d2cb0c53c219
Provide the encryption key to the Drone server:
Drone stores large text files (e.g. build logs) in the database by default. You can configure Drone to store large files externally in S3. This can significantly reduce the size of your database, and may improve overall performance and scalability.
Provide the Drone server with your AWS credentials:
AWS_ACCESS_KEY_ID=AC7CBED7971FDCD0 AWS_SECRET_ACCESS_KEY=1fb023a72bd510053ab88ec3dd50a8eb5b8a1d58d9 AWS_DEFAULT_REGION=us-east-1 AWS_REGION=us-east-1
Provide the Drone server with your Bucket name: