Skip to content

Commit

Permalink
Extend make up to automatically initialise the database (#6855)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinclift authored Apr 13, 2024
1 parent 70bb684 commit 713aca4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 713aca4

Please sign in to comment.