makefile fix

This commit is contained in:
dal 2025-05-09 11:37:32 -06:00
parent fe6f312e1c
commit 8e3c3e3400
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 10 additions and 11 deletions

View File

@ -1,20 +1,19 @@
dev:
@echo "Checking services for dev target..."
@if ! (docker ps -q -f name=buster-redis-make -f status=running > /dev/null && \
docker ps -q -f name=supabase_db -f status=running > /dev/null && \
docker ps -q -f name=supabase_kong -f status=running > /dev/null); then \
echo "One or more dev services (Redis, Supabase DB, Supabase Kong) not running. Restarting all..."; \
@echo "Checking/Restarting Redis for dev target..."
@if ! docker ps -q -f name=buster-redis-make -f status=running > /dev/null; then \
echo "Redis container 'buster-redis-make' not running. Restarting it..."; \
docker stop buster-redis-make || true; \
docker rm buster-redis-make || true; \
supabase stop || true; \
echo "Starting Redis..."; \
(cd .. && docker run -d --name buster-redis-make -p 6379:6379 -v buster_redis_data:/data redis && cd api); \
echo "Starting Supabase..."; \
supabase start; \
echo "Services restarted."; \
echo "Redis restarted."; \
else \
echo "Dev services (Redis and Supabase) already running."; \
echo "Redis container 'buster-redis-make' already running."; \
fi
@echo "Ensuring Supabase is (re)started for dev target..."
supabase stop || true
@echo "Starting Supabase..."
supabase start
@echo "Supabase (re)started."
supabase db reset
export DATABASE_URL=postgres://postgres:postgres@127.0.0.1:54322/postgres && \
diesel migration run && \