Deploying to PostgreSQL with drm-cli + Liquibase or Flyway #6
dband-drm
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This week we published a step-by-step tutorial on deploying to PostgreSQL using drm-cli layered on top of Liquibase or Flyway. Wanted to share the approach here and hear how others are handling PostgreSQL deployments in their pipelines.
The problem we kept running into
Liquibase and Flyway are solid tools for versioning your PostgreSQL schema. But once you're managing deployments across multiple environments — dev, staging, prod — you start needing things they don't provide out of the box:
That's the gap drm-cli fills. It doesn't replace Liquibase or Flyway — it runs on top of them.
What a PostgreSQL release looks like with drm-cli
A minimal
release.ymltargeting PostgreSQL with Liquibase looks like this:Run it with:
drm-cli calls Liquibase under the hood, captures the result, logs the deployment to its release history, and handles retries if the connection drops mid-run.
Encrypted credentials
If you'd rather not rely on environment variables, drm-cli supports encrypting the connection string at rest:
drm-cli encrypt --value "postgresql://deploy_user:password@db.internal.example.com:5432/billing"Store the encrypted value in your
release.yml. drm-cli decrypts it at deploy time using your key — the plaintext never sits in the file.Release history
After every deployment, drm-cli writes a record to its local history store:
That's separate from Liquibase's
DATABASECHANGELOGtable — it's a deployment-level audit trail, not a changelog table.Full tutorial
The complete step-by-step guide — including Flyway configuration, environment setup, and troubleshooting — is on dev.to:
👉 Deploy to PostgreSQL with drm-cli + Liquibase: A Step-by-Step Guide
Questions for the community
A few things we're curious about based on conversations we've had:
Are you running Liquibase or Flyway for PostgreSQL, or something else? We built first-class support for both, but we want to make sure we're covering the patterns people actually use.
How are you handling credentials in your deployment pipelines? Environment variables, secrets managers, encrypted files — we've seen all three. Curious what's working.
Are you deploying to a single PostgreSQL instance, or managing multiple environments from one pipeline? The multi-environment case is where drm-cli's release history becomes most useful — happy to dig into that if it's relevant.
Drop your setup in the comments. If you're hitting a specific pain point with PostgreSQL deployments, we want to hear it — it feeds directly into what we prioritise for v1.2.
drm-cli is free and open-source.
Docs → github.com/dband-drm/drm-cli
Install →
pip install drm-cliBeta Was this translation helpful? Give feedback.
All reactions