automated ec2 setup and build
This commit is contained in:
parent
bf8b932cdc
commit
1afbc41599
5 changed files with 103 additions and 49 deletions
|
|
@ -122,16 +122,11 @@ echo "--- Creating everytab database ---"
|
|||
sudo -u postgres psql -p 5432 -c "CREATE USER everytab;" 2>/dev/null || true
|
||||
sudo -u postgres psql -p 5432 -c "CREATE DATABASE everytab OWNER everytab;" 2>/dev/null || true
|
||||
|
||||
# --- Apply schema ---
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
SCHEMA="$SCRIPT_DIR/../pipeline/01_cc_index/schema.sql"
|
||||
if [ -f "$SCHEMA" ]; then
|
||||
echo "--- Applying schema ---"
|
||||
psql -U everytab -h localhost -d everytab -f "$SCHEMA"
|
||||
else
|
||||
echo "Warning: schema.sql not found at $SCHEMA"
|
||||
echo "Copy it over and run: psql -U everytab -h localhost -d everytab -f schema.sql"
|
||||
fi
|
||||
# --- Schema ---
|
||||
# Schema is applied from the compute instance over the network:
|
||||
# psql $DATABASE_URL -f pipeline/01_cc_index/schema.sql
|
||||
echo "--- Schema ---"
|
||||
echo "Apply schema from compute instance: psql \$DATABASE_URL -f pipeline/01_cc_index/schema.sql"
|
||||
|
||||
# --- Validate ---
|
||||
echo ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue