Spaces:
Sleeping
Sleeping
| pg_ctlcluster 15 main start | |
| # Wait for PostgreSQL to be ready | |
| echo "Waiting for PostgreSQL to be ready..." | |
| attempts=0 | |
| max_attempts=30 | |
| until pg_isready -h localhost || [ $attempts -ge $max_attempts ]; do | |
| echo "Waiting for PostgreSQL to be ready... (attempt $((attempts + 1))/$max_attempts)" | |
| attempts=$((attempts + 1)) | |
| sleep 1 | |
| done | |
| if [ $attempts -ge $max_attempts ]; then | |
| echo "Error: PostgreSQL failed to start after $max_attempts attempts" | |
| exit 1 | |
| fi | |
| psql -c "ALTER USER postgres WITH PASSWORD 'postgres_passwordabc';" | |