Skip to content

Commit

Permalink
✨ add migrations init container for running database migrations on de…
Browse files Browse the repository at this point in the history
…ployment. (#192)
  • Loading branch information
gregkonush authored Aug 25, 2024
1 parent af741ef commit 0556e8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions apps/ecran/kustomize/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/ecran/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 0556e8a

Please sign in to comment.