Marc Cataford
0242b2d5ff
* build(backend): set up Django 4.2 scaffolding * feat: porting files API feat: file ownership basics feat: gaps in test compatibility * test: port files API tests * fix(tests): test database port 5432>5431 to avoid conflict with application database * feat(auth): LoginView, middleware to handle JWT bearer tokens * refactor: clean up old FastAPI logic, temporary utils * refactor: resolve LoginView linting * feat: user creation + test coverage * test: session creation coverage * refactor: hoist secrets, replace placeholders * chore: clear linting errors+warns
23 lines
616 B
Bash
23 lines
616 B
Bash
#!/bin/bash
|
|
|
|
# Provisions a Postgres database locally.
|
|
#
|
|
# This is useful if you are not hosting your database instance
|
|
# elsewhere or want a simple setup for development purposes.
|
|
|
|
CONTAINER_NAME=rotini_db
|
|
|
|
docker run \
|
|
--name $CONTAINER_NAME \
|
|
-e POSTGRES_PASSWORD=$DATABASE_PASSWORD \
|
|
-e POSTGRES_USER=$DATABASE_USER \
|
|
-e POSTGRES_DB=$DATABASE_NAME \
|
|
-v $DATABASE_STORAGE_PATH:/var/lib/postgresql/data \
|
|
-p 5432:5432 \
|
|
-d \
|
|
postgres:15.4
|
|
|
|
until [ -n "$(docker exec $CONTAINER_NAME pg_isready | grep accepting)" ]; do
|
|
echo "Waiting for DB to come alive..."
|
|
sleep 0.1;
|
|
done;
|