Merge ingest-api, collector-worker, admin-ui, database/error_reporting, deploy/lxc, docker-compose, and deployment docs into the dedicated repository. Paths updated for repo root (ER_REPO_ROOT, systemd WorkingDirectory). Root README documents layout. Co-Authored-By: Paperclip <[email protected]>
24 lines
700 B
Bash
Executable File
24 lines
700 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
: "${PGHOST:=postgres}"
|
|
: "${PGUSER:=postgres}"
|
|
: "${PGDATABASE:=error_reporting}"
|
|
|
|
until pg_isready -h "$PGHOST" -U "$PGUSER" -d "$PGDATABASE"; do
|
|
sleep 1
|
|
done
|
|
|
|
_run_sql() {
|
|
psql -h "$PGHOST" -U "$PGUSER" -d "$PGDATABASE" -v ON_ERROR_STOP=1 -f "$1"
|
|
}
|
|
|
|
_run_sql "/migrations/20260322043000_create_error_reporting_core.up.sql"
|
|
_run_sql "/migrations/20260322044000_create_error_occurrences_and_states.up.sql"
|
|
_run_sql "/migrations/20260322044500_add_ingest_idempotency.up.sql"
|
|
_run_sql "/migrations/20260322045000_create_collectors_retention_and_audit.up.sql"
|
|
_run_sql "/seed/dev_two_projects.sql"
|
|
_run_sql "/seed/dev_collector_http_fixture.sql"
|
|
|
|
echo "docker-migrate: complete"
|