-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
61 lines (55 loc) · 1.24 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
version: "3.9"
services:
frontend-server:
container_name: frontend
image: nginx
build: ./frontend-server
ports:
- "8080:80"
depends_on:
- api-gateway
api-gateway:
container_name: api-gateway
image: nginx
restart: on-failure
build: ./gateway
ports:
- "8000:80"
depends_on:
- accounts-service
- inventory-service
accounts-service:
container_name: accounts-api
build: ./accounts-service
restart: on-failure
depends_on:
- db1
environment:
- DATABASE_URL=postgresql://postgres:password@db1/accounts_db
db1:
container_name: accounts-db
image: postgres
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: accounts_db
inventory-service:
container_name: inventory-api
build: ./inventory-service
restart: on-failure
depends_on:
- db2
- caching-db
db2:
container_name: inventory-db
image: postgres
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: inventory_db
caching-db:
container_name: redis-caching
image: redis
restart: unless-stopped