-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
116 lines (107 loc) · 2.6 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
version: "3.9"
services:
users-service:
build:
dockerfile: build/users.Dockerfile
restart: unless-stopped
platform: linux/amd64
command: [ "./main" ]
ports:
- "7001:7001"
environment:
DB_NAME: otterside
DB_SERVICE_HOST: postgres
DB_SERVICE_USER: postgres
DB_SERVICE_PASS: password
depends_on:
- postgres
products-service:
build:
dockerfile: build/products.Dockerfile
restart: unless-stopped
platform: linux/amd64
command: [ "./main" ]
ports:
- "7002:7002"
environment:
STORAGE_ENABLED: false
STORAGE_BUCKET_NAME: bucket-name
STORAGE_OBJECT_KEY: products.json
newsletter-service:
build:
dockerfile: build/newsletter.Dockerfile
restart: unless-stopped
platform: linux/amd64
command: ["node", "index.js"]
ports:
- "7003:7003"
environment:
DB_NAME: otterside
DB_SERVICE_HOST: postgres
DB_SERVICE_USER: postgres
DB_SERVICE_PASS: password
depends_on:
- postgres
cart-service:
build:
dockerfile: build/cart.Dockerfile
restart: unless-stopped
platform: linux/amd64
ports:
- "7004:7004"
environment:
REDIS_HOST: redis
PRODUCTS_SERVICE_API: https://products-service:7002
depends_on:
- products-service
- redis
checkout-service:
build:
dockerfile: build/checkout.Dockerfile
restart: unless-stopped
platform: linux/amd64
command: ["node", "index.js"]
ports:
- "7005:7005"
environment:
CART_SERVICE_API: https://cart-service:7004
depends_on:
- cart-service
frontend-service:
build:
dockerfile: build/frontend.Dockerfile
restart: unless-stopped
platform: linux/amd64
ports:
- "7000:7000"
environment:
CART_SERVICE_API: https://cart-service:7004
USERS_SERVICE_API: https://users-service:7001
PRODUCTS_SERVICE_API: https://products-service:7002
CHECKOUT_SERVICE_API: https://checkout-service:7005
NEWSLETTER_SERVICE_API: https://newsletter-service:7003
depends_on:
- cart-service
- users-service
- products-service
- checkout-service
- newsletter-service
postgres:
image: postgres:14
restart: unless-stopped
ports:
- "5432:5432"
shm_size: 4gb
environment:
POSTGRES_DB: otterside
POSTGRES_PASSWORD: password
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- postgres:/var/lib/postgresql/data
redis:
image: redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
postgres: