-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
62 lines (57 loc) · 1.33 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.PHONY: docker-build-all
docker-build-all:
docker build -t api-auth:v1 ./authentication
.PHONY: docker-run-all
docker-run-all:
docker run -d \
--name db \
--network my-network \
-e POSTGRES_PASSWORD=foobarbaz \
-v pgdata:/var/lib/postgresql/data \
-p 5432:5432 \
--restart unless-stopped \
postgres:15.1-alpine
docker run -d \
--name auth \
--network my-network \
-e POSTGRES_PASSWORD=foobarbaz \
-e DB_HOST=db \
-e DB_PORT=5432 \
-e DB_USER=postgres \
-e DB_PASSWORD=foobarbaz \
-e DB_NAME=blogx \
-e PORT=8080 \
-e JWT_SECRET_KEY=foobarbaz \
-e BCRYPT_SALT_VALUE=12 \
-e DB_URL="postgres://postgres:foobarbaz@db:5432/blogx?sslmode=disable" \
-p 8080:8080 \
--restart unless-stopped \
--link db \
api-auth:v1
docker run -d \
--name blog \
--network my-network \
-e POSTGRES_PASSWORD=foobarbaz \
-e DB_HOST=db \
-e DB_PORT=5432 \
-e DB_USER=postgres \
-e DB_PASSWORD=foobarbaz \
-e DB_NAME=blogx \
-e PORT=8081 \
-e JWT_SECRET_KEY=foobarbaz \
-e BCRYPT_SALT_VALUE=12 \
-e DB_URL="postgres://postgres:foobarbaz@db:5432/blogx?sslmode=disable" \
-p 8081:8081 \
--restart unless-stopped \
--link db \
api-blog:v1
.PHONY: docker-stop-all
docker-stop-all:
docker stop db
docker stop auth
docker stop blog
.PHONY: docker-rm-all
docker-rm-all:
docker rm auth
docker rm db
docker rm blog