···2828 key: password
2929 - name: DATABASE_URL
3030 value: "postgres://$(DATABASE_USER):$(DATABASE_PASSWORD)@postgres-rw.default.svc.cluster.local:5432/app"
3131- - name: POSTGRES_URL
3232- value: "postgres://$(DATABASE_USER):$(DATABASE_PASSWORD)@postgres-rw.default.svc.cluster.local:5432/postgres"
3331 command:
3432 - /bin/sh
3533 - -c
3634 - |
3735 echo "Waiting for database to be ready..."
3838- for i in {1..30}; do
3939- if pg_isready -h $DATABASE_URL; then
3636+ for i in $(seq 1 30); do
3737+ if pg_isready -d $DATABASE_URL; then
4038 echo "Database is ready!"
4139 break
4240 fi
4341 echo "Attempt $i/30: Database not ready yet, waiting..."
4442 sleep 10
4543 done
4646-4747- echo "Making sure extensions are installed"
4848- psql "$POSTGRES_URL" -c "CREATE EXTENSION IF NOT EXISTS pg_cron;"
49445045 echo "Setting up migration"
5146 ./app