fix: crash loop recovery, auto-migrations, CI test pipeline

- Wrap startup syncs in safeStartup() to prevent crash on external service failure
- Add migrate-entrypoint.sh for auto-generating migrations from schema diff
- Update Dockerfile migration stage to use entrypoint script
- Add test job to build-and-publish workflow (runs before build)
- Add tests.yaml workflow to run tests on every push
- Fix test setup to use real RSA key pair instead of plain strings
- Add test script to package.json
This commit is contained in:
2026-02-27 16:11:28 -06:00
parent b1f6462ac3
commit 508fa39835
8 changed files with 124 additions and 16 deletions
+4 -1
View File
@@ -67,4 +67,7 @@ RUN bun install --frozen-lockfile
COPY prisma/ prisma/
COPY prisma.config.ts ./
CMD ["bunx", "prisma", "migrate", "deploy"]
COPY prisma/migrate-entrypoint.sh ./prisma/migrate-entrypoint.sh
RUN chmod +x prisma/migrate-entrypoint.sh
CMD ["sh", "prisma/migrate-entrypoint.sh"]