mirror of
https://github.com/coollabsio/coolify-examples.git
synced 2026-04-05 20:01:32 +00:00
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:
20
docker-compose-bind-mount-preview/scripts/bootstrap_db.sh
Normal file
20
docker-compose-bind-mount-preview/scripts/bootstrap_db.sh
Normal 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!"
|
||||
Reference in New Issue
Block a user