postgres

Configure DigitalOcean Postgres with per-app schemas and bindable credentials.

35|4|Updated Dec 28, 2025
One-click install
npx skills add https://github.com/digitalocean-labs/do-app-platform-skills --skill postgres-digitalocean-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres
Source: https://github.com/digitalocean-labs/do-app-platform-skills/tree/main/skills/postgres
Command: npx skills add https://github.com/digitalocean-labs/do-app-platform-skills --skill postgres-digitalocean-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires psycopg2-binary, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Configuring DigitalOcean Managed Postgres for App Platform can be error-prone when needing separate per-app schemas or secure, pull-based credentials. This Skill provides repeatable workflows to set up databases, create users, assign proper permissions, and wire credentials into your deployment context.

Core Features & Use Cases

  • Path A: Bindable Variables for single-app deployments, enabling automatic population of environment variables like ${db.DATABASE_URL} by leveraging DO's managed passwords and controlled permissions.
  • Path B: Schema Isolation for multi-tenant SaaS or multiple apps sharing a cluster, using dedicated schemas and users to enforce data isolation.
  • Use Case: Rapidly bootstrap a new app with secure access patterns and minimal manual intervention, then scale to multiple tenants with consistent governance.

Quick Start

Run the Path A or Path B workflow to configure a database, create users, grant permissions, and store credentials.

Frequently Asked Questions about postgres

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate schemas for multi-tenant apps on DigitalOcean App Platform Postgres?

Schema isolation for multi-tenant apps on DigitalOcean App Platform Postgres is configured using dedicated schemas and users to enforce data separation. The workflow provisions users, assigns permissions, and manages schemas within a shared cluster.

How do I bind Postgres credentials to a single-app deployment on App Platform?

Postgres credentials are bound to single-app deployments on App Platform using bindable variables that automatically populate environment variables like ${db.DATABASE_URL}. This Path A workflow leverages managed passwords and controlled permissions for secure access.

Can I use doctl to automate Postgres user provisioning and schema creation?

Yes, doctl can automate Postgres user provisioning and schema creation by enforcing permission grants as doadmin. The workflow includes scripts for schema creation, user provisioning, pool management, and connection string generation.

What's the best way to manage GitHub Secrets for DigitalOcean Postgres connection strings?

Managing GitHub Secrets for DigitalOcean Postgres connection strings is handled through the workflow's connection string generation scripts. These scripts create secure credentials that integrate with doctl and GitHub Secrets for pull-based deployment configurations.

Does configuring App Platform Postgres with psycopg2 support both single-app and multi-tenant setups?

Configuring App Platform Postgres with psycopg2 supports both single-app deployments needing standard CRUD operations and multi-tenant setups requiring separate schemas. The workflow covers Path A for bindable variables and Path B for schema isolation.

Why do my Postgres permission grants fail when setting up multi-tenant schema isolation?

Postgres permission grants may fail during multi-tenant schema isolation setup if not executed as doadmin. The workflow specifically enforces permission grants under the doadmin role to ensure proper user provisioning and schema access control.