Productionize EventSphere platform
This commit is contained in:
13
restore-prod.sh
Normal file
13
restore-prod.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
echo "Usage: ./restore-prod.sh <path-to-dump>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ENV_FILE="${ENV_FILE:-.env.production}"
|
||||
COMPOSE_FILE="${COMPOSE_FILE:-docker-compose.prod.yml}"
|
||||
DUMP_FILE="$1"
|
||||
|
||||
docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" exec -T postgres pg_restore -U eventsphere -d eventsphere --clean --if-exists < "$DUMP_FILE"
|
||||
Reference in New Issue
Block a user