-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
183 lines (170 loc) · 4.15 KB
/
docker-compose.yml
File metadata and controls
183 lines (170 loc) · 4.15 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
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
version: '3.8'
services:
api-gateway:
build:
context: ./api-gateway
dockerfile: Dockerfile
container_name: api-gateway
ports:
- "8080:8080"
environment:
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- AUTH_SERVICE_URL=http://auth-service:8082
- USER_SERVICE_URL=http://user-service:8081
- MENU_SERVICE_URL=http://menu-service:8083
- ORDER_SERVICE_URL=http://order-service:8084
- PAYMENT_SERVICE_URL=http://payment-service:8085
- REVIEW_SERVICE_URL=http://review-service:8086
networks:
- blaban-network
auth-service:
build:
context: ./auth-service
dockerfile: Dockerfile
container_name: auth-service
ports:
- "8082:8082"
environment:
- AUTH_DB_DSN=postgres://postgres:password@postgres:5432/auth?sslmode=disable
- REDIS_HOST=redis
- REDIS_PORT=6379
depends_on:
- postgres
- redis
networks:
- blaban-network
frontend:
build:
context: ./front/arch-project
dockerfile: Dockerfile
container_name: blaban-frontend-builder
volumes:
- frontend_build:/app/dist
networks:
- blaban-network
user-service:
build:
context: ./user-service
dockerfile: Dockerfile
container_name: user-service
ports:
- "8081:8081"
environment:
- USER_DB_DSN=postgres://postgres:password@postgres:5432/users?sslmode=disable
- AUTH_SERVICE_URL=http://auth-service:8082
depends_on:
- postgres
- auth-service
networks:
- blaban-network
menu-service:
build:
context: ./menu-service
dockerfile: Dockerfile
container_name: menu-service
ports:
- "8083:8083"
environment:
- MENU_DB_DSN=postgres://postgres:password@postgres:5432/menu?sslmode=disable
- AUTH_SERVICE_URL=http://auth-service:8082
depends_on:
- postgres
- auth-service
networks:
- blaban-network
order-service:
build:
context: ./order-service
dockerfile: Dockerfile
container_name: order-service
ports:
- "8084:8084"
environment:
- MONGO_URI=mongodb://mongo:27017/orders
- MENU_SERVICE_URL=http://menu-service:8083
- AUTH_SERVICE_URL=http://auth-service:8082
depends_on:
- mongo
- auth-service
- menu-service
networks:
- blaban-network
payment-service:
build:
context: ./payment-service
dockerfile: Dockerfile
container_name: payment-service
ports:
- "8085:8085"
environment:
- MONGO_URI=mongodb://mongo:27017/payments
- ORDER_SERVICE_URL=http://order-service:8084
depends_on:
- mongo
networks:
- blaban-network
review-service:
build:
context: ./review-service
dockerfile: Dockerfile
container_name: review-service
ports:
- "8086:8086"
environment:
- MONGO_URI=mongodb://mongo:27017/reviews
- USER_SERVICE_URL=http://user-service:8081
depends_on:
- mongo
networks:
- blaban-network
mongo:
image: mongo:latest
container_name: mongo
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
networks:
- blaban-network
redis:
image: redis:alpine
container_name: blaban-redis
ports:
- "6379:6379"
networks:
- blaban-network
nginx:
image: nginx:alpine
container_name: blaban-nginx
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- frontend_build:/usr/share/nginx/html
depends_on:
- frontend
- api-gateway
networks:
- blaban-network
postgres:
image: postgres:14-alpine
container_name: postgres
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=postgres
- POSTGRES_MULTIPLE_DATABASES=users,auth,menu
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-postgres.sh:/docker-entrypoint-initdb.d/init-postgres.sh
networks:
- blaban-network
networks:
blaban-network:
driver: bridge
volumes:
mongo_data:
postgres_data:
frontend_build: