diff --git a/blueprints/postgres-pgdog/docker-compose.yml b/blueprints/postgres-pgdog/docker-compose.yml new file mode 100644 index 00000000..f5164d9c --- /dev/null +++ b/blueprints/postgres-pgdog/docker-compose.yml @@ -0,0 +1,33 @@ +services: + postgres-pgdog: + image: ${PGDOG_IMAGE} + restart: unless-stopped + # Uncomment 'ports' settings below to enable external access + # ports: + # - "6432:6432" + volumes: + - ../files/pgdog.toml:/pgdog/pgdog.toml + - ../files/users.toml:/pgdog/users.toml + environment: + - RUST_LOG=${RUST_LOG} + depends_on: + postgres: + condition: service_healthy + + postgres: + image: ${POSTGRES_IMAGE} + restart: unless-stopped + environment: + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_DB=${POSTGRES_DB} + volumes: + - postgres-data:/var/lib/postgresql + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] + interval: 10s + timeout: 5s + retries: 5 + +volumes: + postgres-data: diff --git a/blueprints/postgres-pgdog/postgres-pgdog.png b/blueprints/postgres-pgdog/postgres-pgdog.png new file mode 100644 index 00000000..bbc4aae7 Binary files /dev/null and b/blueprints/postgres-pgdog/postgres-pgdog.png differ diff --git a/blueprints/postgres-pgdog/template.toml b/blueprints/postgres-pgdog/template.toml new file mode 100644 index 00000000..2ffc4ec0 --- /dev/null +++ b/blueprints/postgres-pgdog/template.toml @@ -0,0 +1,36 @@ +[variables] +postgres_user = "${username}" +postgres_password = "${password:32}" +postgres_db = "postgres" +pgdog_image = "ghcr.io/pgdogdev/pgdog:v0.1.26" +postgres_image = "postgres:18-alpine" + +[[config.mounts]] +filePath = "pgdog.toml" +content = """ +[general] +host = "0.0.0.0" +port = 6432 + +[[databases]] +name = "${postgres_db}" +host = "postgres" +port = 5432 +""" + +[[config.mounts]] +filePath = "users.toml" +content = """ +[[users]] +name = "${postgres_user}" +database = "${postgres_db}" +password = "${postgres_password}" +""" + +[config.env] +POSTGRES_USER = "${postgres_user}" +POSTGRES_PASSWORD = "${postgres_password}" +POSTGRES_DB = "${postgres_db}" +PGDOG_IMAGE = "${pgdog_image}" +POSTGRES_IMAGE = "${postgres_image}" +RUST_LOG = "info" diff --git a/meta.json b/meta.json index 16211e50..8e74fce0 100644 --- a/meta.json +++ b/meta.json @@ -5106,6 +5106,25 @@ "webmail" ] }, + { + "id": "postgres-pgdog", + "name": "PostgreSQL with PgDog", + "version": "0.1.26", + "description": "PostgreSQL database with PgDog connection pooler, load balancer, and horizontal scaling proxy. A modern alternative to PgBouncer with multi-threading support.", + "logo": "postgres-pgdog.png", + "links": { + "github": "https://github.com/pgdogdev/pgdog", + "website": "https://pgdog.dev", + "docs": "https://docs.pgdog.dev" + }, + "tags": [ + "database", + "postgresql", + "pooler", + "proxy", + "load-balancer" + ] + }, { "id": "postgresus", "name": "Postgresus",