Skip to content

fix(docker): un-ignore supabase/migrations (completes #149, unbreaks image build)#150

Merged
ABB65 merged 1 commit into
mainfrom
fix/dockerignore-supabase-migrations
Jul 13, 2026
Merged

fix(docker): un-ignore supabase/migrations (completes #149, unbreaks image build)#150
ABB65 merged 1 commit into
mainfrom
fix/dockerignore-supabase-migrations

Conversation

@ABB65

@ABB65 ABB65 commented Jul 13, 2026

Copy link
Copy Markdown
Member

Problem

#149 added COPY --from=build /app/supabase/migrations … to the runtime image, but .dockerignore still excludes the whole supabase dir. So the build stage never receives supabase/migrations and the image build fails:

failed to compute cache key: "/app/supabase/migrations": not found

This breaks the image build on main right now (staging redeploys fail — fail-safe, old release stays live).

Fix

Replace the blanket supabase ignore with:

supabase/*
!supabase/migrations

Excludes the Supabase local-dev assets (config.toml, seed.sql, snippets, templates) but keeps supabase/migrations — which the pre-deploy migration runner reads (it applies both postgres/migrations and supabase/migrations as one lineage).

Together with #149

#149 + this = the Railway pre-deploy command node scripts/migrate-postgres.mjs works end-to-end: image carries the runner + full SQL lineage + pg, migrations apply before each release serves.

The .dockerignore excluded the whole `supabase` dir, so the build stage
had no supabase/migrations and the runtime COPY failed with
'/app/supabase/migrations: not found'. Exclude only the Supabase local-dev
assets (config/seed/snippets/templates) and keep migrations — the pg
migration runner reads both postgres/migrations and supabase/migrations.
@ABB65 ABB65 merged commit 8cfe266 into main Jul 13, 2026
2 checks passed
@ABB65 ABB65 deleted the fix/dockerignore-supabase-migrations branch July 13, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant