Add docker-compose bind mount preview test case (#67)

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>
This commit is contained in:
Andras Bacsai
2026-03-16 12:40:20 +01:00
committed by GitHub
parent 7719c65320
commit 4838432850
3 changed files with 81 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#!/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!"