-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
39 lines (31 loc) · 891 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Makefile for Docker Compose
# Start the Docker Compose services
docker-up:
@docker-compose up -d
# Stop and remove the Docker Compose services
docker-down:
@docker-compose down
# Show the status of the Docker Compose services
docker-status:
@docker-compose ps
# Clean up Docker resources
docker-clean:
@docker-compose down -v --remove-orphans
db-reset:
@docker-compose down -v --remove-orphans
@docker-compose up -d
@echo "Waiting for database to be ready..."
@sleep 3 > NUL
@echo "Running migrations..."
@bun run db:migrate
db-reset-migrate:
@docker-compose down -v --remove-orphans
@docker-compose up -d
@echo "Waiting for database to be ready..."
@sleep 3 > NUL
@echo "Generate schemas..."
@bun run db:generate
@sleep 2 > NUL
@echo "Running migrations..."
@bun run db:migrate
.PHONY: docker-up docker-down docker-status docker-clean db-reset db-reset-migrate