Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/scripts/dev/mark-local-database.sh
T

14 lines
553 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$ROOT"
# Deliberately target only this repository's Docker Compose Postgres service.
# Never follow DATABASE_URL here: it might point through a tunnel.
docker compose -f docker-compose.yml -f docker-compose.dev.yml exec -T postgres \
sh -eu -c 'exec psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB"' \
< scripts/dev/init-local-database.sql
echo "Marked the repository Docker Postgres database as disposable local development data."