fix(ci): draai DB-migraties in deploy voor het vervangen van de container
CI / check (push) Successful in 1m4s
CI / deploy (push) Successful in 1m29s

Zonder dit loopt nieuwe code tegen een oud schema aan zodra een push
migraties bevat. Idempotent (toegepaste migraties worden overgeslagen),
draait op de host met de productie-.env, vóór de container-replace.
This commit is contained in:
openhands committed 2026-09-04 12:34:49 +02:00
1 parent 3fdcf028e8
commit 61769e355b
2 files changed
+17

No files matched your search

+7
View File
@@ -62,6 +62,13 @@ describe("deploy job", () => {
expect(deployJob).toContain("docker compose");
});
it("runs database migrations before replacing the container", () => {
expect(deployJob).toContain("pnpm db:migrate");
expect(deployJob.indexOf("pnpm db:migrate")).toBeLessThan(
deployJob.indexOf("docker stop epicnext-cms-app"),
);
});
it("runs health check", () => {
expect(deployJob).toContain("/api/health");
expect(deployJob).toContain('"database":true');