Menu

Run pressly/goose Migrations as a Flisk One-Shot Job
📰

Run pressly/goose Migrations as a Flisk One-Shot Job

DEV Community: postgres·flisk·about 5 hours ago
#S4DSpsDr
#devtopostgresql#devto#dev#goose#flisk
Reading 0:00
15s threshold

The third Goose is a database migrator: pressly/goose . People type goose in a terminal and mean goose up . Flisk will not grow a --language goose for that. Migrations are a job that runs once and exits, which is the shape Flisk already documents for dbmate, Atlas, Prisma, and Drizzle.

This post wires goose that way, next to a real Flisk backend. Local only. Your production migrator stays in your pipeline.

Split the processes

Process Owns Restarts?

API ( --language go or python ) HTTP, GET /health yes, with the stack

goose job schema up/down no, one-shot

Postgres data Flisk's local database, not goose

Do not bake goose up into the API container entrypoint. A crash loop will re-apply migrations, and a health check will lie about whether the schema move finished.

Layout

shop/ billing/ service.json # flisk backend src/ ...…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.