forked from gmflau/google-dev-day-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
119 lines (111 loc) · 2.85 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
version: '3.8'
services:
database-seed:
container_name: database-seed
build:
context: ./
dockerfile: dockerfile-database-seed
args:
BUILD_BASE_PATH: database
image: gcr.io/${PROJECT_ID}/redis-ms-cqrs-database_seed:latest
restart: on-failure
env_file:
- ./.env
cdn:
container_name: cdn
build:
context: ./
dockerfile: dockerfile-cdn
args:
BUILD_BASE_PATH: cdn
image: gcr.io/${PROJECT_ID}/redis-ms-cqrs-cdn:latest
ports:
- '${CDN_PORT}:80'
orders-service:
container_name: orders-service
build:
context: ./
dockerfile: dockerfile-server
args:
BUILD_BASE_PATH: server/src/services/orders
image: gcr.io/${PROJECT_ID}/redis-ms-cqrs-orders_service:latest
ports:
- '${ORDERS_SERVICE_PORT}:3001'
env_file:
- ./.env
order-history-service:
container_name: order-history-service
build:
context: ./
dockerfile: dockerfile-server
args:
BUILD_BASE_PATH: server/src/services/order-history
image: gcr.io/${PROJECT_ID}/redis-ms-cqrs-order_history_service:latest
ports:
- '${ORDER_HISTORY_SERVICE_PORT}:3002'
env_file:
- ./.env
products-service:
container_name: products-service
build:
context: ./
dockerfile: dockerfile-server
args:
BUILD_BASE_PATH: server/src/services/products
image: gcr.io/${PROJECT_ID}/redis-ms-cqrs-products_service:latest
ports:
- '${PRODUCTS_SERVICE_PORT}:3003'
env_file:
- ./.env
payments-service:
container_name: payments-service
build:
context: ./
dockerfile: dockerfile-server
args:
BUILD_BASE_PATH: server/src/services/payments
image: gcr.io/${PROJECT_ID}/redis-ms-cqrs-payments_service:latest
ports:
- '${PAYMENTS_SERVICE_PORT}:3004'
env_file:
- ./.env
depends_on:
- orders-service
api-gateway:
container_name: api-gateway
build:
context: ./
dockerfile: dockerfile-server
args:
BUILD_BASE_PATH: server/src/api-gateway
image: gcr.io/${PROJECT_ID}/redis-ms-cqrs-api_gateway:latest
ports:
- '${API_GATEWAY_PORT}:3000'
env_file:
- ./.env
depends_on:
- orders-service
- order-history-service
- products-service
client:
container_name: client
build:
context: ./
dockerfile: dockerfile-client
args:
BUILD_BASE_PATH: client/nextjs
API_GATEWAY_URI: ${API_GATEWAY_URI}
NEXT_PUBLIC_API_GATEWAY_URI: ${NEXT_PUBLIC_API_GATEWAY_URI}
image: gcr.io/${PROJECT_ID}/redis-ms-cqrs-client:latest
ports:
- '${FRONTEND_CLIENT_PORT}:4200'
env_file:
- ./.env
stdin_open: true # -i input flag
tty: true # -t terminal flag
depends_on:
- api-gateway
- cdn
volumes:
redis-data:
mongodb-data: