mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-02 21:25:10 +00:00
1.5 KiB
1.5 KiB
Postgres
Drone comes with support for Postgres as an alternate database engine. To enable Postgres, you should specify the following environment variables:
DATABASE_DRIVER="postgres"
DATABASE_CONFIG="postgres://root:pa55word@127.0.0.1:5432/postgres"
Postgres configuration
The following is the standard URI connection scheme:
postgres://[username:password@]host[:port]/[dbname][?options]
The components of this string are:
postgres://required prefixusername: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:
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.