+8
-3
@@ -44,12 +44,17 @@ steps:
|
|||||||
- name: migrate
|
- name: migrate
|
||||||
image: localhost:5000/studio-auth-be:0.1.1
|
image: localhost:5000/studio-auth-be:0.1.1
|
||||||
imagePullPolicy: Always
|
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:
|
envFrom:
|
||||||
- configMapRef:
|
|
||||||
name: studio-auth-be-env
|
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: studio-auth-be-env
|
name: studio-auth-be-env
|
||||||
|
- secretRef:
|
||||||
|
name: studio-auth-db-secret
|
||||||
EOF
|
EOF
|
||||||
if ! kubectl --kubeconfig=/tmp/kubeconfig -n studio-system wait --for=condition=complete "job/$job" --timeout=180s; then
|
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
|
kubectl --kubeconfig=/tmp/kubeconfig -n studio-system logs "job/$job" --all-containers=true || true
|
||||||
|
|||||||
@@ -33,7 +33,5 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- containerPort: 4100
|
- containerPort: 4100
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
|
||||||
name: studio-auth-be-env
|
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: studio-auth-be-env
|
name: studio-auth-be-env
|
||||||
|
|||||||
Reference in New Issue
Block a user