Extend make up to automatically initialise the database (#6855)

This commit is contained in:
Justin Clift
2024-04-13 14:47:41 +10:00
committed by GitHub
parent 70bb684d9e
commit 713aca440a

View File

@@ -8,6 +8,10 @@ compose_build: .env
docker compose build
up:
docker compose up -d redis postgres
docker compose exec -u postgres postgres psql postgres --csv \
-1tqc "SELECT table_name FROM information_schema.tables WHERE table_name = 'organizations'" 2> /dev/null \
| grep -q "organizations" || make create_database
docker compose up -d --build
test_db: