Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ COPY --from=build /app/.output ./.output
# Contentrain content (needed for UI strings via @contentrain/query)
COPY --from=build /app/.contentrain ./.contentrain

# Database migration runner + SQL lineage. The managed pair does NOT migrate
# at app start; the Railway pre-deploy command (`node scripts/migrate-postgres.mjs`)
# runs this before the new image serves, so the schema is always applied ahead
# of the release. The app bundles its own pg inside .output; this standalone
# runner lives outside that tree, so it gets a self-contained pg (its only
# non-builtin import, matched to the app's resolved 8.22.0).
COPY --from=build /app/scripts/migrate-postgres.mjs /app/scripts/verify-managed-schema.mjs ./scripts/
COPY --from=build /app/postgres/migrations ./postgres/migrations
COPY --from=build /app/supabase/migrations ./supabase/migrations
RUN printf '{"name":"studio-migrations","private":true,"type":"module"}\n' > package.json \
&& npm install --no-fund --no-audit pg@8.22.0 \
&& npm cache clean --force

# Git needs a writable home for config
ENV HOME=/home/studio
ENV NODE_ENV=production
Expand Down
Loading