-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
132 lines (122 loc) · 3.48 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
# extracted from https://github.com/aws-containers/retail-store-sample-app
version: '2'
services:
ui:
ports:
- 80:8080
environment:
- JAVA_OPTS=-XX:MaxRAMPercentage=75.0 -Djava.security.egd=file:/dev/urandom
- SERVER_TOMCAT_ACCESSLOG_ENABLED=true
- ENDPOINTS_CATALOG=http://catalog:8080
- ENDPOINTS_CARTS=http://carts:8080
- ENDPOINTS_ORDERS=http://orders:8080
- ENDPOINTS_CHECKOUT=http://checkout:8080
- ENDPOINTS_ASSETS=http://assets:8080
hostname: ui
image: public.ecr.aws/aws-containers/retail-store-sample-ui
restart: always
mem_limit: 256m
cap_drop:
- ALL
catalog:
hostname: catalog
image: public.ecr.aws/aws-containers/retail-store-sample-catalog
restart: always
environment:
- GIN_MODE=release
- DB_PASSWORD=test
mem_limit: 128m
cap_drop:
- ALL
catalog-db:
image: mariadb:10.9
hostname: catalog-db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=test
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_DATABASE=sampledb
- MYSQL_USER=catalog_user
- MYSQL_PASSWORD=test
mem_limit: 128m
carts:
hostname: carts
image: public.ecr.aws/aws-containers/retail-store-sample-cart
restart: always
environment:
- JAVA_OPTS=-XX:MaxRAMPercentage=75.0 -Djava.security.egd=file:/dev/urandom
- SERVER_TOMCAT_ACCESSLOG_ENABLED=true
- SPRING_PROFILES_ACTIVE=dynamodb
- CARTS_DYNAMODB_ENDPOINT=http://carts-db:8000
- CARTS_DYNAMODB_CREATETABLE=true
- AWS_ACCESS_KEY_ID=key
- AWS_SECRET_ACCESS_KEY=dummy
mem_limit: 256m
cap_drop:
- ALL
carts-db:
image: amazon/dynamodb-local:1.20.0
hostname: carts-db
restart: always
mem_limit: 128m
orders:
hostname: orders
image: public.ecr.aws/aws-containers/retail-store-sample-orders
restart: always
environment:
- JAVA_OPTS=-XX:MaxRAMPercentage=75.0 -Djava.security.egd=file:/dev/urandom
- SERVER_TOMCAT_ACCESSLOG_ENABLED=true
- SPRING_PROFILES_ACTIVE=mysql,rabbitmq
- SPRING_DATASOURCE_WRITER_URL=jdbc:mariadb://orders-db:3306/orders
- SPRING_DATASOURCE_WRITER_USERNAME=orders_user
- SPRING_DATASOURCE_WRITER_PASSWORD=test
- SPRING_DATASOURCE_READER_URL=jdbc:mariadb://orders-db:3306/orders
- SPRING_DATASOURCE_READER_USERNAME=orders_user
- SPRING_DATASOURCE_READER_PASSWORD=test
- SPRING_RABBITMQ_HOST=rabbitmq
mem_limit: 256m
cap_drop:
- ALL
orders-db:
image: mariadb:10.9
hostname: orders-db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=test
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_DATABASE=orders
- MYSQL_USER=orders_user
- MYSQL_PASSWORD=test
mem_limit: 128m
checkout:
image: public.ecr.aws/aws-containers/retail-store-sample-checkout
hostname: checkout
restart: always
read_only: true
tmpfs:
- /tmp:rw,noexec,nosuid
environment:
- REDIS_URL=redis://checkout-redis:6379
- ENDPOINTS_ORDERS=http://orders:8080
mem_limit: 256m
cap_drop:
- ALL
checkout-redis:
image: redis:6-alpine
hostname: checkout-redis
restart: always
mem_limit: 128m
assets:
hostname: assets
environment:
- PORT=8080
image: public.ecr.aws/aws-containers/retail-store-sample-assets
restart: always
mem_limit: 64m
cap_drop:
- ALL
rabbitmq:
image: rabbitmq:3-management
ports:
- "5672:5672"
- "15672:15672"