+8
-3
@@ -44,12 +44,17 @@ steps:
|
||||
- name: migrate
|
||||
image: localhost:5000/studio-auth-be:0.1.1
|
||||
imagePullPolicy: Always
|
||||
command: ["sh", "-lc", "bunx --no-install prisma migrate deploy"]
|
||||
command:
|
||||
- sh
|
||||
- -lc
|
||||
- |
|
||||
export DATABASE_URL="postgresql://\${POSTGRES_USER}:\$(bun -e 'process.stdout.write(encodeURIComponent(process.env.POSTGRES_PASSWORD ?? ""))')@studio-auth-db.studio-system.svc.cluster.local:5432/\${POSTGRES_DB}?schema=public"
|
||||
bunx --no-install prisma migrate deploy
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: studio-auth-be-env
|
||||
- secretRef:
|
||||
name: studio-auth-be-env
|
||||
- secretRef:
|
||||
name: studio-auth-db-secret
|
||||
EOF
|
||||
if ! kubectl --kubeconfig=/tmp/kubeconfig -n studio-system wait --for=condition=complete "job/$job" --timeout=180s; then
|
||||
kubectl --kubeconfig=/tmp/kubeconfig -n studio-system logs "job/$job" --all-containers=true || true
|
||||
|
||||
@@ -33,7 +33,5 @@ spec:
|
||||
ports:
|
||||
- containerPort: 4100
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: studio-auth-be-env
|
||||
- secretRef:
|
||||
name: studio-auth-be-env
|
||||
|
||||
Reference in New Issue
Block a user