diff --git a/apps/ecran/kustomize/deployment.yaml b/apps/ecran/kustomize/deployment.yaml index d6be353..ecc4761 100644 --- a/apps/ecran/kustomize/deployment.yaml +++ b/apps/ecran/kustomize/deployment.yaml @@ -16,6 +16,16 @@ spec: spec: imagePullSecrets: - name: gitea-registry + initContainers: + - name: run-migrations + image: gitea.proompteng.ai/d/lab/ecran:main + command: ['pnpm', 'run', 'migrations'] + env: + - name: DB_URI + valueFrom: + secretKeyRef: + name: ecran-cluster-app + key: uri containers: - name: ecran image: gitea.proompteng.ai/d/lab/ecran:main diff --git a/apps/ecran/package.json b/apps/ecran/package.json index 3c59aa1..77d064a 100644 --- a/apps/ecran/package.json +++ b/apps/ecran/package.json @@ -13,7 +13,7 @@ "db:studio": "drizzle-kit studio", "db:push": "drizzle-kit push", "db:pull": "drizzle-kit pull", - "migrate": "tsx ./src/db/migrate.ts" + "migrations": "tsx ./src/db/migrate.ts" }, "dependencies": { "@mdx-js/loader": "^3.0.1",