-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
109 lines (97 loc) · 2.87 KB
/
docker-compose.yaml
File metadata and controls
109 lines (97 loc) · 2.87 KB
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
services:
rustex-db:
profiles: [debug, rustex-db]
image: postgres
restart: always
shm_size: 128mb
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${PG_USERNAME}
POSTGRES_PASSWORD: ${PG_PASSWORD}
volumes:
- rustex_pg:/var/lib/postgresql/data
backend-api: # Can be linked to multiple exchange services
profiles: [debug, api]
image: backend/rest-api
build:
context: .
dockerfile: Dockerfile.api
volumes:
- ./tls_certs:/tls_certs
environment:
TLS_CERT_PATH: tls_certs/cert.pem
TLS_KEY_PATH: tls_certs/key.pem
SERVER_ADDRESS: "0.0.0.0"
SERVER_PORT: "5000"
EXCHANGE_MARKETS: "BTC_USD, BTC_EUR, BTC_GBP" # Can be a comma separated list
BTC_USD_RPC_MATCH_SERVER: "backend-match-micro-usd:5555"
BTC_EUR_RPC_MATCH_SERVER: "backend-match-micro-eur:5556"
BTC_GBP_RPC_MATCH_SERVER: "backend-match-micro-gbp:5557"
restart: unless-stopped
ports:
- "5000:5000"
backend-db-micro:
profiles: [debug, db-service]
image: backend/microservices
build:
context: .
dockerfile: Dockerfile.micro
command: ["db-service"]
restart: unless-stopped
environment:
DATABASE_RPC_ADDRESS: "0.0.0.0" # Micro service listening address
POSTGRES_ADDRESS: "rustex-db:5432/rustex"
backend-match-micro-usd: # 1 Micro service per exchange
profiles: [debug, match-service]
image: backend/microservices
build:
context: .
dockerfile: Dockerfile.micro
command: ["match-service"]
restart: unless-stopped
environment:
DATABASE_RPC_ADDRESS: "backend-db-micro"
MATCH_RPC_ADDRESS: "0.0.0.0"
MATCH_RPC_PORT: "5555"
EXCHANGE_MARKET: "BTC_USD"
backend-match-micro-eur: # 1 Micro service per exchange
profiles: [debug, match-service]
image: backend/microservices
build:
context: .
dockerfile: Dockerfile.micro
command: ["match-service"]
restart: unless-stopped
environment:
DATABASE_RPC_ADDRESS: "backend-db-micro"
MATCH_RPC_ADDRESS: "0.0.0.0"
MATCH_RPC_PORT: "5556"
EXCHANGE_MARKET: "BTC_EUR"
backend-match-micro-gbp: # 1 Micro service per exchange
profiles: [debug, match-service]
image: backend/microservices
build:
context: .
dockerfile: Dockerfile.micro
command: ["match-service"]
restart: unless-stopped
environment:
DATABASE_RPC_ADDRESS: "backend-db-micro"
MATCH_RPC_ADDRESS: "0.0.0.0"
MATCH_RPC_PORT: "5557"
EXCHANGE_MARKET: "BTC_GBP"
rustex-tests: # Rustex tests
profiles: [test]
image: backend/e2e-test
build:
context: .
dockerfile: Dockerfile.test
environment:
RUSTEX_API_URL: "https://backend-api:5000"
TLS_CERT_PATH: tls_certs/cert.pem
TLS_KEY_PATH: tls_certs/key.pem
volumes:
- ./tls_certs:/tls_certs
volumes:
rustex_pg: