-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
145 lines (135 loc) · 3.39 KB
/
docker-compose.yaml
File metadata and controls
145 lines (135 loc) · 3.39 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
services:
# =========== FRONTEND ===========
frontend:
build:
context: ./front-end
dockerfile: Dockerfile
target: dev
ports:
- "4200:4200"
volumes:
- ./front-end:/app
- /app/node_modules
environment:
- NODE_OPTIONS=--max_old_space_size=4096
restart: unless-stopped
# =========== INFRAESTRUTURA BASE ===========
rabbitmq:
image: rabbitmq:3-management
ports:
- "5672:5672"
- "15672:15672"
restart: unless-stopped
api-gateway:
build:
context: ./back-end/api-gateway
dockerfile: Dockerfile
target: dev
ports:
- "8080:8080"
volumes:
- ./back-end/api-gateway:/app
- maven-repo:/root/.m2
- /app/node_modules
restart: unless-stopped
# =========== BANCOS DE DADOS ===========
mongodb-auth:
image: mongo:latest
ports:
- "27017:27017"
volumes:
- mongo-auth-data:/data/db
restart: unless-stopped
postgres-db:
image: postgres:15
environment:
- POSTGRES_USER=springuser
- POSTGRES_PASSWORD=password
- POSTGRES_DB=bantads_db
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql
restart: unless-stopped
# =========== MICROSSERVIÇOS ===========
ms-auth:
build:
context: ./back-end/auth
dockerfile: Dockerfile
target: dev
ports:
- "8081:8080"
depends_on:
- mongodb-auth
environment:
- MONGO_URI=mongodb://mongodb-auth:27017/bantads_auth
volumes:
- ./back-end/auth:/app
- maven-repo:/root/.m2
restart: unless-stopped
ms-cliente:
build:
context: ./back-end/cliente
dockerfile: Dockerfile
target: dev
ports:
- "8082:8080"
depends_on:
- postgres-db
- rabbitmq
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres-db:5432/bantads_db?currentSchema=ms_cliente
- SPRING_DATASOURCE_USERNAME=springuser
- SPRING_DATASOURCE_PASSWORD=password
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
- SPRING_RABBITMQ_HOST=rabbitmq
volumes:
- ./back-end/cliente:/app
- maven-repo:/root/.m2
restart: unless-stopped
ms-gerente:
build:
context: ./back-end/gerente
dockerfile: Dockerfile
target: dev
ports:
- "8083:8080"
depends_on:
- postgres-db
- rabbitmq
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres-db:5432/bantads_db?currentSchema=ms_gerente
- SPRING_DATASOURCE_USERNAME=springuser
- SPRING_DATASOURCE_PASSWORD=password
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
- SPRING_RABBITMQ_HOST=rabbitmq
volumes:
- ./back-end/gerente:/app
- maven-repo:/root/.m2
restart: unless-stopped
conta:
build:
context: ./back-end/conta
dockerfile: Dockerfile
target: dev
ports:
- "8084:8080"
depends_on:
- postgres-db
- rabbitmq
environment:
- DB_CUD_URL=jdbc:postgresql://postgres-db:5432/bantads_db
- DB_READ_URL=jdbc:postgresql://postgres-db:5432/bantads_db
- DB_USERNAME=springuser
- DB_PASSWORD=password
- SPRING_RABBITMQ_HOST=rabbitmq
volumes:
- ./back-end/conta:/app
- maven-repo:/root/.m2
restart: unless-stopped
# VOLUMES
volumes:
maven-repo:
mongo-auth-data:
postgres-data: