-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
84 lines (76 loc) · 1.73 KB
/
docker-compose.yaml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '3.9'
services:
user-db:
image: postgres:latest
restart: always
ports:
- 5432:5432
volumes:
- ~/apps/postgres:/var/lib/postgresql/data
- ./Data:/docker-entrypoint-initdb.d
environment:
- POSTGRES_PASSWORD=s@admin
- POSTGRES_USER=userdb
- POSTGRES_DB=identity-db
networks:
- microservice-network
product-db:
image: mysql:latest
restart: always
ports:
- "3306:3306"
expose:
- '3306'
environment:
- MYSQL_ROOT_PASSWORD=hardPassword
- MYSQL_USER=productdb
- MYSQL_PASSWORD=hardPassword
- MYSQL_DATABASE=product-db
volumes:
- ~/apps/mysql:/var/lib/mysql
- ./Data/product-service.sql:/docker-entrypoint-initdb.d/1.sql
networks:
- microservice-network
api-gateway:
depends_on:
- user-db
- product-db
build:
context: .
dockerfile: ApiGateway/Dockerfile
ports:
- "8080:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:8080
networks:
- microservice-network
identity-service:
depends_on:
- user-db
build:
context: .
dockerfile: IdentityService/Dockerfile
ports:
- "8081:8081"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:8081
networks:
- microservice-network
product-service:
depends_on:
- product-db
build:
context: .
dockerfile: ProductService/Dockerfile
ports:
- "8082:8082"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:8082
networks:
- microservice-network
networks:
microservice-network:
driver: bridge