mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
1.6 KiB
1.6 KiB
Postgres
Drone comes with support for Postgres as an alternate database engine. To enable Postgres, you must specify the DRONE_DATASTORE environment variable with the URI configuration string. This section describes the URI format for configuring the Postgres driver.
The following is the standard URI connection scheme:
postgres://[username:password@]host[:port]/[dbname][?options]
The components of this string are:
postgres://required prefix to load the Postgres driverusername:password@optional. Use these credentials when connecting to the Postgres instance.hostserver address to connect to. It may be a hostname, IP address, or UNIX domain socket.:portoptional. The default value is:5432if not specified.dbnamename of the database to connect to?optionsconnection specific options
This is an example connection string:
DRONE_DATASTORE="postgres://root:pa55word@127.0.0.1:5432/postgres"
Postgres options
This section lists all connection options used in the connection string format. Connection options are pairs in the following form: name=value. The value is always case sensitive. Separate options with the ampersand (i.e. &) character:
sslmodeinitiates the connection with TLS/SSL (disable, require, verify-ca, verify-full)connect_timeoutmaximum wait for connection, in seconds.sslcertcert file location. The file must contain PEM encoded data.sslkeykey file location. The file must contain PEM encoded data.sslrootcertlocation of the root certificate file. The file must contain PEM encoded data.