-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
46 lines (40 loc) · 1.18 KB
/
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
41
42
43
44
45
46
.PHONY: start
start:
docker compose up -d
HOST=localhost make migration/up
.PHONY: dev
dev:
docker compose -f docker-compose.dev.yml up -d
HOST=localhost make migration/up
.PHONY: attach
attach:
docker compose exec $(app) sh
.PHONY: stop
stop:
docker compose down
.PHONY: migration/up
migration/up:
docker run -t --network=host -v "$(shell pwd)/auth-plus-authentication/db:/db" ghcr.io/amacneil/dbmate:1.16 \
--url postgres://root:db_password@$(HOST):5432/auth?sslmode=disable \
--wait \
--wait-timeout 60s \
--no-dump-schema up
docker run -t --network=host -v "$(shell pwd)/auth-plus-billing/db:/db" ghcr.io/amacneil/dbmate:1.16 \
--url postgres://root:db_password@$(HOST):5432/billing?sslmode=disable \
--wait \
--wait-timeout 60s \
--no-dump-schema up
.PHONY: clean/docker
clean/docker:
make stop
docker container prune -f
docker volume prune -f
docker network prune -f
docker rmi auth-plus-symphony-authentication
docker rmi auth-plus-symphony-billing-http
docker rmi auth-plus-symphony-billing-kafka
docker rmi auth-plus-symphony-client
docker rmi auth-plus-symphony-notification-http
docker rmi auth-plus-symphony-notification-kafka
rm -rf db/schema.sql
rm -f db/schema.sql