-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
180 lines (171 loc) · 4.92 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
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
version: '3.9'
services:
orders-eventstore:
image: ghcr.io/eventstore/eventstore:21.10.2-alpha-arm64v8
restart: always
environment:
- EVENTSTORE_CLUSTER_SIZE=1
- EVENTSTORE_RUN_PROJECTIONS=All
- EVENTSTORE_START_STANDARD_PROJECTIONS=true
- EVENTSTORE_EXT_TCP_PORT=1113
- EVENTSTORE_HTTP_PORT=2113
- EVENTSTORE_INSECURE=true
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
- EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
ports:
- "1113:1113"
- "2113:2113"
volumes:
- type: volume
source: orders-eventstore-volume-data
target: /var/lib/eventstore
- type: volume
source: orders-eventstore-volume-logs
target: /var/log/eventstore
orders-mongo:
image: mongo:6.0.4-jammy
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: user
MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: orders
ports:
- "27017:27017"
volumes:
- type: volume
source: orders-mongo-volume-data
target: /data/db
healthcheck:
test: [ "CMD","mongosh", "--eval", "db.adminCommand('ping')" ]
interval: 5s
timeout: 5s
retries: 3
start_period: 5s
orders-api:
image: orders-api:latest
build:
dockerfile: dockerfile
target: orders-api
context: .
restart: always
environment:
- ASPNETCORE_URLS=http://+:3000
- WriteDb__ConnectionString=esdb://admin:changeit@orders-eventstore:2113?tls=false
- ReadDb__ConnectionString=mongodb://user:password@orders-mongo:27017
- RabbitMq__ConnectionString=rabbitmq://user:password@rabbitmq:5672/vhost
- PaymentsApi__Host=http://payments-api:3000
ports:
- "30000:3000"
depends_on:
payments-api:
condition: service_started
rabbitmq:
condition: service_healthy
orders-mongo:
condition: service_healthy
orders-eventstore:
condition: service_healthy
payments-eventstore:
image: ghcr.io/eventstore/eventstore:21.10.2-alpha-arm64v8
restart: always
environment:
- EVENTSTORE_CLUSTER_SIZE=1
- EVENTSTORE_RUN_PROJECTIONS=All
- EVENTSTORE_START_STANDARD_PROJECTIONS=true
- EVENTSTORE_EXT_TCP_PORT=1113
- EVENTSTORE_HTTP_PORT=2113
- EVENTSTORE_INSECURE=true
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
- EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
ports:
- "1123:1113"
- "2123:2113"
volumes:
- type: volume
source: payments-eventstore-volume-data
target: /var/lib/eventstore
- type: volume
source: payments-eventstore-volume-logs
target: /var/log/eventstore
payments-mongo:
image: mongo:6.0.4-jammy
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: user
MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: payments
ports:
- "27027:27017"
volumes:
- type: volume
source: payments-mongo-volume-data
target: /data/db
healthcheck:
test: [ "CMD","mongosh", "--eval", "db.adminCommand('ping')" ]
interval: 5s
timeout: 5s
retries: 3
start_period: 5s
payments-api:
image: payments-api:latest
build:
dockerfile: dockerfile
target: payments-api
context: .
restart: always
environment:
- ASPNETCORE_URLS=http://+:3000
- WriteDb__ConnectionString=esdb://admin:changeit@payments-eventstore:2113?tls=false
- ReadDb__ConnectionString=mongodb://user:password@payments-mongo:27017
- RabbitMq__ConnectionString=rabbitmq://user:password@rabbitmq:5672/vhost
ports:
- "30010:3000"
depends_on:
rabbitmq:
condition: service_healthy
payments-mongo:
condition: service_healthy
payments-eventstore:
condition: service_healthy
rabbitmq:
image: arm64v8/rabbitmq:3-management
environment:
- RABBITMQ_NODE_TYPE=queue-disc
- RABBITMQ_DEFAULT_USER=user
- RABBITMQ_DEFAULT_PASS=password
- RABBITMQ_DEFAULT_VHOST=vhost
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
interval: 30s
timeout: 30s
retries: 10
ports:
- '5672:5672'
- '15672:15672'
volumes:
- 'rabbitmq:/var/lib/rabbitmq'
e2e-tests:
image: e2e-tests:latest
build:
dockerfile: Dockerfile
target: e2e-tests
context: .
restart: 'no'
environment:
- PaymentsApi__Host=http://payments-api:3000
- OrdersApi__Host=http://orders-api:3000
entrypoint: |
/bin/sh -c 'sleep 10; dotnet E2eTests.dll --where "cat=E2E"'
depends_on:
payments-api:
condition: service_started
orders-api:
condition: service_started
volumes:
orders-eventstore-volume-data:
orders-eventstore-volume-logs:
orders-mongo-volume-data:
payments-eventstore-volume-data:
payments-eventstore-volume-logs:
payments-mongo-volume-data:
rabbitmq: