File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
5+ REPO_ROOT=" $( cd " ${SCRIPT_DIR} /../.." && pwd) "
6+
7+ if ! command -v nc > /dev/null 2>&1 ; then
8+ echo " error: required command 'nc' not found."
9+ exit 1
10+ fi
11+
12+ if ! nc -z localhost 5432 > /dev/null 2>&1 ; then
13+ echo " Postgres is not reachable at localhost:5432."
14+ echo " Hint: run scripts/dev/run-postgres.sh to start the local Postgres container."
15+ exit 1
16+ fi
17+
18+ cd " ${REPO_ROOT} "
19+
20+ RIVET__POSTGRES__URL=postgres://postgres:postgres@localhost:5432/postgres \
21+ RUST_LOG=debug \
22+ cargo run --bin rivet-engine -- start " $@ "
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ CONTAINER_NAME=" rivet-engine-postgres"
5+ POSTGRES_IMAGE=" postgres:17"
6+
7+ if docker ps --all --format ' {{.Names}}' | grep -qw " ${CONTAINER_NAME} " ; then
8+ if docker ps --format ' {{.Names}}' | grep -qw " ${CONTAINER_NAME} " ; then
9+ docker stop " ${CONTAINER_NAME} " > /dev/null 2>&1 || true
10+ fi
11+ docker rm " ${CONTAINER_NAME} " > /dev/null 2>&1 || true
12+ fi
13+
14+ docker run \
15+ --detach \
16+ --name " ${CONTAINER_NAME} " \
17+ --publish 5432:5432 \
18+ --env POSTGRES_PASSWORD=postgres \
19+ --env POSTGRES_USER=postgres \
20+ --env POSTGRES_DB=postgres \
21+ " ${POSTGRES_IMAGE} "
You can’t perform that action at this time.
0 commit comments