-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (31 loc) · 963 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
39
40
OS := $(shell uname -s)
ifeq ($(OS), Linux)
RM = sudo rm -rf
else ifeq ($(OS), Darwin) # macOS
RM = sudo rm -rf
else ifeq ($(OS), Windows_NT)
RM = rmdir /s /q
else
RM = echo "Unsupported OS"
endif
build-dev:
docker compose -f docker-compose.dev.yaml up --build --detach
run-dev:
docker compose -f docker-compose.dev.yaml up
run-test:
docker compose -f docker-compose.test.yaml up
build-prod:
docker compose -f docker-compose.yaml up --build
run-prod:
docker compose -f docker-compose.yaml up
# Après la commande, ajouter name=(NomDeLaMigration)
generate-migration:
docker exec -it backend npm run migration:generate -- src/database/migrations/$(name)
populate-db:
docker exec -it backend npm run populate-db
clean-dev:
docker compose -f docker-compose.dev.yaml down
docker rm -f $(shell docker ps -a -q) 2> /dev/null || true
docker volume rm $(shell docker volume ls -q) 2> /dev/null || true
$(RM) data
docker system prune -f