Skip to content

dmarcwise/caddy-storage-postgresql

Repository files navigation

Caddy Storage PostgresQL

Warning

This project is still a work in progress. Do not use in production.

A storage implementation for Caddy / certmagic that uses PostgreSQL as the backend.

How to use

Build the module into your Caddy binary:

xcaddy build --with github.com/dmarcwise/caddy-storage-postgresql

You can pin a specific commit with:

xcaddy build --with github.com/dmarcwise/caddy-storage-postgresql@<commit-hash>

Configure Caddy to use the PostgreSQL storage module. Example Caddyfile:

{
    storage postgresql {
        dsn "postgres://user:password@localhost:5432/caddy?sslmode=disable"
    }
}

The dsn parameter is a PostgreSQL connection string, either as a key/value string or as a connection URI.

The sslmode connection parameter defaults to require. We recommend setting a statement_timeout (e.g. 30s) and other basic parameters.

This module implementation already sets the following connection pooling parameters:

  • Maximum open connections: 10
  • Maximum idle connections: 3
  • Connection maximum idle time: 1h

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages