diff options
| author | soryu <soryu@soryu.co> | 2025-12-23 02:14:58 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2025-12-23 14:47:18 +0000 |
| commit | a32dc56d2e5447ef8988cb98b8686476cc94e70c (patch) | |
| tree | 61307503c4af82103cea2360fe95d3ea324968d6 /makima/sh/setup-db.sh | |
| parent | 73649d135efccda7e446775db773e21b458de202 (diff) | |
| download | soryu-a32dc56d2e5447ef8988cb98b8686476cc94e70c.tar.gz soryu-a32dc56d2e5447ef8988cb98b8686476cc94e70c.zip | |
Add Postgres for persistence and File cabinet
Migrations are local only currently, and must be run manually by setting POSTGRES_CONNECTION_URI
Diffstat (limited to 'makima/sh/setup-db.sh')
| -rwxr-xr-x | makima/sh/setup-db.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/makima/sh/setup-db.sh b/makima/sh/setup-db.sh new file mode 100755 index 0000000..95e35ac --- /dev/null +++ b/makima/sh/setup-db.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Combined database setup script + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +echo "=== Setting up Makima Database ===" +echo "" + +# Start PostgreSQL +echo "Step 1: Starting PostgreSQL..." +bash "${SCRIPT_DIR}/start-postgres.sh" +echo "" + +# Wait a moment for full initialization +sleep 2 + +# Run migrations +echo "Step 2: Running migrations..." +bash "${SCRIPT_DIR}/run-migrations.sh" +echo "" + +echo "=== Database setup complete! ===" |
