From 50eabff6cd7dc3c0e14f16ac9d6b17564ece05a2 Mon Sep 17 00:00:00 2001 From: Jacob Windsor Date: Wed, 19 Feb 2025 13:05:34 +0100 Subject: [PATCH] Add start --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ab070d0..74bd667 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,13 @@ install: install-dev: $(VENV_DIR)/bin/pip install -r $(REQ_FILE) -r requirements-dev.txt -start: install - $(VENV_DIR)/bin/python $(APP_NAME) +start: + docker compose up -d db + @echo "Waiting for the database to be ready..." + @while ! nc -z localhost 5432; do \ + sleep 1; \ + done + uvicorn backend.app.main:app --reload --host 0.0.0.0 --port 8080 --reload-include backend/app start-db: docker-compose up -d db