mirror of
https://github.com/coollabsio/coolify-examples.git
synced 2026-04-05 20:01:32 +00:00
Test case for coolify#7802 — reproduces the bug where bind mount volumes from repo content get an incorrect -pr-N suffix during Preview Deployments. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
490 B
Bash
21 lines
490 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
echo "Waiting for PostgreSQL to be ready..."
|
|
until psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -c '\q' 2>/dev/null; do
|
|
sleep 1
|
|
done
|
|
|
|
echo "Creating test table..."
|
|
psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" <<SQL
|
|
CREATE TABLE IF NOT EXISTS test_table (
|
|
id SERIAL PRIMARY KEY,
|
|
name VARCHAR(100) NOT NULL,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
INSERT INTO test_table (name) VALUES ('hello from bootstrap');
|
|
SQL
|
|
|
|
echo "Bootstrap complete!"
|