mirror of https://github.com/buster-so/buster.git
makefile fix
This commit is contained in:
parent
fe6f312e1c
commit
8e3c3e3400
21
api/makefile
21
api/makefile
|
@ -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 && \
|
||||
|
|
Loading…
Reference in New Issue