postgres
/postgres
Configure DigitalOcean Managed Postgres with bindable variables or schema isolation. Use when setting up databases, creating users, managing permissions, configuring multi-tenant schemas, or troubleshooting database connectivity on App Platform.
- Author
- digitalocean-labs ↗
- Repository
- do-app-platform-skills ↗
- Licence
- MIT
- Last repository change
- 25.10.2026
Assessment and security
- Files in this package
- 21
- Scripts
- 11
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 11 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/add_client.py, scripts/cleanup_client.py, scripts/create_schema_user.py, scripts/generate_connection_string.py, scripts/get_admin_conn.sh, scripts/list_schemas_users.py, scripts/secure_setup.py, scripts/secure_setup.sh, templates/migrations/alembic.template.py, templates/orm/drizzle.template.ts, templates/orm/sqlalchemy.template.py
What it does and when to use it
Configure DigitalOcean Managed Postgres with bindable variables or schema isolation. Use when setting up databases, creating users, managing permissions, configuring multi-tenant schemas, or troubleshooting database connectivity on App Platform.
Original author description
Configure DigitalOcean Managed Postgres with bindable variables or schema isolation. Use when setting up databases, creating users, managing permissions, configuring multi-tenant schemas, or troubleshooting database connectivity on App Platform.
How it works
- Quick Decision
- Path A: Bindable Variables (Recommended)
- Path B: Schema Isolation
- Available Bindable Variables
- Scripts
- Reference Files
- Common Issues (Quick Fixes)
- Integration with Other Skills
SKILL.md preview
---
name: postgres
version: 1.0.0
min_doctl_version: "1.82.0"
description: Configure DigitalOcean Managed Postgres with bindable variables or schema isolation. Use when setting up databases, creating users, managing permissions, configuring multi-tenant schemas, or troubleshooting database connectivity on App Platform.
related_skills: [designer, networking]
deprecated: false
---
# Postgres Skill
Configure DigitalOcean Managed Postgres databases with proper security isolation and production-ready defaults.
## Quick Decision
```
Need multiple isolated schemas in one database?
├── YES → Path B (Schema Isolation)
└── NO → Path A (Bindable Variables) ✅ RECOMMENDED
```
---
## Path A: Bindable Variables (Recommended)
Use when: Single app per database, standard CRUD applications.
### Quick Start
```bash
# 1. Create cluster + user via doctl (DO stores password internally)
doctl databases create my-app-db --engine pg --region nyc3 --size db-s-1vcpu-2gb
CLUSTER_ID=$(doctl databases list --format ID,Name --no-header | grep my-app-db | awk '{print $1}')
doctl databases db create $CLUSTER_ID myappdb
doctl databases user create $CLUSTER_ID myappuser
# 2. Grant permissions (REQUIRED - users have no access by default!)
# Run: scripts/grant_permissions.sql as doadmin
# 3. Reference in app spec
```
```yaml
# .do/app.yaml
databases:
- name: db
engine: PG
production: true
cluster_name: my-app-db
db_name: myappdb
db_user: myappuser
services:
- name: api
envs:
- key: DATABASE_URL
scope: RUN_TIME
value: ${db.DATABASE_URL}
```
**Full guide**: See [path-a-bindable-vars.md](reference/path-a-bindable-vars.md)
---
## Path B: Schema Isolation
Use when: Multi-tenant SaaS, multiple apps sharing one cluster, schema-level isolation needed.
### Quick Start
```bash
# Hands-free setup (requires gh CLI)
./scripts/secure_setup.sh \
--admin-url "$ADMIN_URL" \
--app-name myapp \
--schema myapp \
--repo owner/repo
```
Password flows directly to GitHub Secrets — never displayed.
**Full guide**: See [path-b-schema-isolation.md](reference/path-b-schema-isolation.md)
---
## Available Bindable Variables
| Variable | Example |
|----------|---------|
| `${db.DATABASE_URL}` | `postgresql://user:pass@host:25060/db?sslmode=require` |
| `${db.HOSTNAME}` | `my-db-do-user-123.db.ondigitalocean.com` |
| `${db.PORT}` | `25060` |
| `${db.USERNAME}` | `myappuser` |
| `${db.PASSWORD}` | (auto-populated) |
| `${db.DATABASE}` | `myappdb` |
| `${db.CA_CERT}` | (certificate content) |
---
## Scripts
| Script | Purpose |
|--------|---------|
| `scripts/secure_setup.sh` | Hands-free Path B setup with GitHub Secrets |
| `scripts/create_schema_user.py` | Create isolated schema + user |
| `scripts/list_schemas_users.py` | Audit existing schemas/users |
| `scripts/generate_connection_string.py` | Build connection strings |
---
## Reference Files
- **[path-a-bindable-vars.md](reference/path-a-bindable-vars.md)** — Full Path A workflow, connection pools, multi-app setup
- **[path-b-schema-isolation.md](reference/path-b-schema-isolation.md)** — Full Path B workflow, multi-tenant patterns
- **[orm-configurations.md](reference/orm-configurations.md)** — Prisma, SQLAlchemy, Drizzle, TypeORM configs
- **[database-migrations.md](reference/database-migrations.md)** — Alembic, Prisma Migrate, Drizzle Migrate
- **[doctl-reference.md](reference/doctl-reference.md)** — All `doctl databases` commands
- **[troubleshooting.md](reference/troubleshooting.md)** — Common errors and fixes
- **[bundled-scripts.md](reference/bundled-scripts.md)** — Script usage documentation
---
## Common Issues (Quick Fixes)
| Error | Fix |
|-------|-----|
| "permission denied for schema" | Run permission SQL as doadmin |
| "relation does not exist" | Check `search_path` or use schema-qualified names |
| "too many connections" | Create connection pool via doctl |
| "SSL connection required" | Add `?sslmode=require` to connection string |
| Bindable vars not populated | Verify `production: true` and names match exactly |
**Full troubleshooting**: See [troubleshooting.md](reference/troubleshooting.md)
---
## Integration with Other Skills
- **→ designer**: Add database block to app spec
- **→ deployment**: GitHub Actions workflow with DATABASE_URL secret
- **→ devcontainers**: Local Postgres with prod parity
- **→ troubleshooting**: Debug container for connectivity testing
Files in this package (21)
- README.md 4 KB
- SKILL.md 4 KB
- reference/bundled-scripts.md 3 KB
- reference/database-migrations.md 3 KB
- reference/doctl-reference.md 2 KB
- reference/orm-configurations.md 4 KB
- reference/path-a-bindable-vars.md 7 KB
- reference/path-b-schema-isolation.md 7 KB
- reference/troubleshooting.md 3 KB
- scripts/add_client.py 10 KB
- scripts/cleanup_client.py 7 KB
- scripts/create_schema_user.py 12 KB
- scripts/generate_connection_string.py 4 KB
- scripts/get_admin_conn.sh 2 KB
- scripts/list_schemas_users.py 4 KB
- scripts/secure_setup.py 11 KB
- scripts/secure_setup.sh 9 KB
- templates/migrations/alembic.template.py 5 KB
- templates/orm/drizzle.template.ts 4 KB
- templates/orm/prisma.template.prisma 2 KB
- templates/orm/sqlalchemy.template.py 3 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · digitalocean-labs/do-app-platform-skills | 100 | MIT |
| magnus919/agent-skills | 100 | MIT |
| nimadorostkar/Claude-Skills-collection | 100 | MIT |
| lynricsy/hyperskills | 100 | MIT |
| tuannv14/claude-team-toolkit | 100 | MIT |
| sanjay3290/ai-skills | 100 | Apache-2.0 |
| timescale/pg-aiguide | 90 | Apache-2.0 |
| nahid-sparktales/agent-dispatcher | 90 | MIT |
Database snapshot: 13.11.2026 · package version 7e97f5a92a32 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100managed-db-services
Configure DigitalOcean Managed MySQL, MongoDB, Valkey, Kafka, and OpenSearch for App Platform. Use when setting up non-PostgreSQL databases, configuring trusted sources, or troubleshooting database connectivity. - 100devcontainers
Set up local development environments with production parity for DigitalOcean App Platform. Use when setting up local dev, adding devcontainer to a project, running App Platform apps locally, or configuring backing services (Postgres, Redis, Kafka, S3). - 95digitalocean
Use this skill when the user says 'DigitalOcean', 'DO', 'Droplet', 'DOKS', 'App Platform', 'Spaces', 'Managed Database', 'Floating IP', 'Cloud Firewall', 'doctl', 'Terraform DigitalOcean', 'VPC', 'Load Balancer', 'DNS', 'Container Registry', 'Functions'. Covers: core DO… - 100digitalocean
Use when deploying or operating a workload on DigitalOcean — Droplet vs App Platform vs Functions, doctl, app spec YAML, Managed Postgres/MySQL/Valkey on the VPC, S3-compatible Spaces + CDN. NOT host-agnostic CI/CD or rollback strategy (that is `deployment`), NOT a bare Hetzner… - 100digitalocean
Expert DigitalOcean cloud assistance covering Droplets, App Platform, Managed Kubernetes (DOKS), Spaces (S3-compatible), and VPC. Use when deploying, scaling, and managing cloud workloads on DigitalOcean. - 90digitalocean-managed-databases
DigitalOcean Managed Databases for PostgreSQL, MySQL, Redis, MongoDB, Kafka, OpenSearch, and Valkey. Use when provisioning, scaling, or operating managed database clusters on DigitalOcean.