test: add detailed environment and connection testing
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 6m6s
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 6m6s
This commit is contained in:
parent
03f615bf57
commit
7e132608d7
@ -16,16 +16,13 @@ spec:
|
|||||||
command: ["/bin/sh", "-c"]
|
command: ["/bin/sh", "-c"]
|
||||||
args:
|
args:
|
||||||
- |
|
- |
|
||||||
echo "Environment variables:"
|
echo "=== Environment Variables ==="
|
||||||
echo "POSTGRES_NAME: $POSTGRES_NAME"
|
env | grep POSTGRES
|
||||||
echo "POSTGRES_HOSTNAME: $POSTGRES_HOSTNAME"
|
echo "=== Testing Direct Connection ==="
|
||||||
echo "POSTGRES_PORT: $POSTGRES_PORT"
|
|
||||||
echo "POSTGRES_USER: $POSTGRES_USER"
|
|
||||||
echo "Testing direct connection with psql..."
|
|
||||||
PGPASSWORD=$POSTGRES_PASSWORD psql -h $POSTGRES_HOSTNAME -p $POSTGRES_PORT -U $POSTGRES_USER -d $POSTGRES_NAME -c "SELECT 1"
|
PGPASSWORD=$POSTGRES_PASSWORD psql -h $POSTGRES_HOSTNAME -p $POSTGRES_PORT -U $POSTGRES_USER -d $POSTGRES_NAME -c "SELECT 1"
|
||||||
echo "Testing direct connection with connection string..."
|
echo "=== Testing Connection String ==="
|
||||||
PGPASSWORD=$POSTGRES_PASSWORD psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOSTNAME:$POSTGRES_PORT/$POSTGRES_NAME" -c "SELECT 1"
|
PGPASSWORD=$POSTGRES_PASSWORD psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOSTNAME:$POSTGRES_PORT/$POSTGRES_NAME" -c "SELECT 1"
|
||||||
echo "Testing MikroORM connection..."
|
echo "=== Testing MikroORM Connection ==="
|
||||||
node -e "
|
node -e "
|
||||||
const { PostgreSqlDriver } = require('@mikro-orm/postgresql');
|
const { PostgreSqlDriver } = require('@mikro-orm/postgresql');
|
||||||
const { MikroORM } = require('@mikro-orm/core');
|
const { MikroORM } = require('@mikro-orm/core');
|
||||||
@ -49,8 +46,9 @@ spec:
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
"
|
"
|
||||||
echo "Running migrations and seeds..."
|
echo "=== Running Migrations ==="
|
||||||
npx mikro-orm migration:up
|
npx mikro-orm migration:up
|
||||||
|
echo "=== Running Seeds ==="
|
||||||
npm run seed
|
npm run seed
|
||||||
env:
|
env:
|
||||||
{{- range $key, $val := .Values.backend.env }}
|
{{- range $key, $val := .Values.backend.env }}
|
||||||
|
Loading…
Reference in New Issue
Block a user