-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
188 lines (174 loc) · 5.16 KB
/
docker-compose.yml
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
version: '3'
services:
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3-alpine
restart: unless-stopped
ports:
- "5672:5672"
- "15672:15672"
# volumes:
# - rabbitmq-data:/var/lib/rabbitmq
######################### utente #########################
dbpostgresql_utente:
container_name: postgres_utente
image: "postgres"
ports:
- "5433:5432"
volumes:
- utente-db-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: utente
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
restart: unless-stopped
app_utente:
build: utente-microservizio
image: utente
container_name: microservizio_utente
volumes:
- utente-data:/var/lib/utente
ports:
- "8080:8080"
depends_on:
- dbpostgresql_utente
- rabbitmq
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://dbpostgresql_utente:5432/utente
- SPRING_DATASOURCE_USERNAME=admin
- SPRING_DATASOURCE_PASSWORD=admin
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
- SPRING_RABBITMQ_USERNAME=guest
- SPRING_RABBITMQ_PASSWORD=guest
- SPRING_RABBITMQ_HOST=rabbitmq
- SPRING_RABBITMQ_PORT=5672
######################### ospedale #########################
dbpostgresql_ospedale:
container_name: postgres_ospedale
image: "postgres"
ports:
- "5434:5432"
volumes:
- ospedale-db-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: ospedale
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
restart: unless-stopped
app_ospedale:
build: ospedale-microservizio
image: ospedale
container_name: microservizio_ospedale
volumes:
- ospedale-data:/var/lib/ospedale
ports:
- "8081:8080"
depends_on:
- dbpostgresql_ospedale
- rabbitmq
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://dbpostgresql_ospedale:5432/ospedale
- SPRING_DATASOURCE_USERNAME=admin
- SPRING_DATASOURCE_PASSWORD=admin
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
- SPRING_RABBITMQ_USERNAME=guest
- SPRING_RABBITMQ_PASSWORD=guest
- SPRING_RABBITMQ_HOST=rabbitmq
- SPRING_RABBITMQ_PORT=5672
######################### negozio #########################
dbpostgresql_negozio:
container_name: postgres_negozio
image: "postgres"
ports:
- "5435:5432"
volumes:
- negozio-db-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: negozio
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
restart: unless-stopped
app_negozio:
build: negozio-microservizio
image: negozio
container_name: microservizio_negozio
volumes:
- negozio-data:/var/lib/negozio
ports:
- "8082:8080"
depends_on:
- dbpostgresql_negozio
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://dbpostgresql_negozio:5432/negozio
- SPRING_DATASOURCE_USERNAME=admin
- SPRING_DATASOURCE_PASSWORD=admin
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
######################### pgadmin #########################
pgadmin:
container_name: pgadmin4_container_master
image: dpage/pgadmin4
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: root
PGADMIN_LISTEN_PORT: 50
ports:
- "5050:50"
volumes:
- pgadmin-data:/var/lib/pgadmin
links:
- "dbpostgresql_negozio:pgsql-server"
- "dbpostgresql_utente:pgsql-server"
- "dbpostgresql_ospedale:pgsql-server"
depends_on:
- dbpostgresql_negozio
- dbpostgresql_utente
- dbpostgresql_ospedale
logging:
driver: none
######################### frontend - web #########################
frontend_web:
container_name: frontend_web
image: marcoscale98/taass:frontend
ports:
- "4200:80"
volumes:
- frontend-data:/var/lib/frontend
depends_on:
- app_negozio
- app_utente
- app_ospedale
######################## api-gateway ###################
api-gateway:
container_name: api-gateway
build: api-gateway
image: api-gateway
ports:
- "8079:8079"
depends_on:
- app_negozio
- app_utente
- app_ospedale
environment:
SERVER_PORT: 8079
SPRING_CLOUD_GATEWAY_ROUTES[0]_ID: app_utente
SPRING_CLOUD_GATEWAY_ROUTES[0]_URI: http://host.docker.internal:8080/
SPRING_CLOUD_GATEWAY_ROUTES[0]_PREDICATES[0]: Path=/utente/**,/storia/**
SPRING_CLOUD_GATEWAY_ROUTES[1]_ID: app_ospedale
SPRING_CLOUD_GATEWAY_ROUTES[1]_URI: http://host.docker.internal:8081/
SPRING_CLOUD_GATEWAY_ROUTES[1]_PREDICATES[0]: Path=/ospedale/**
SPRING_CLOUD_GATEWAY_ROUTES[2]_ID: app_negozio
SPRING_CLOUD_GATEWAY_ROUTES[2]_URI: http://host.docker.internal:8082/
SPRING_CLOUD_GATEWAY_ROUTES[2]_PREDICATES[0]: Path=/carrelli/**,/indirizzi/**,/ordini/**,/prodotti/**
SPRING_CLOUD_GATEWAY_ROUTES[2]_FILTERS[0]: PrefixPath=/api/v1
######################### volumi #########################
volumes:
negozio-db-data:
negozio-data:
utente-db-data:
utente-data:
ospedale-db-data:
ospedale-data:
pgadmin-data:
rabbitmq-data:
frontend-data: