-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
145 lines (136 loc) · 3.79 KB
/
Copy pathdocker-compose.yml
File metadata and controls
145 lines (136 loc) · 3.79 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
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
services:
frontend:
image: exchange-orderbook-frontend:latest
build:
context: ./frontend
dockerfile: ./frontend/Dockerfile
ports:
- "3001:3000"
networks:
- exchange-net
environment:
- NODE_ENV=production
depends_on:
- postgres
restart: on-failure:3
stop_signal: SIGINT
backend:
image: exchange-orderbook-backend:latest
build:
context: .
dockerfile: crates/backend/Dockerfile
ports:
- "3000:3000"
networks:
- exchange-net
environment:
- DATABASE_URL=postgres://exchange_user:exchange_password@postgres:5432/exchange
- RUST_LOG=info,exchange=trace,tower_http=debug
- CONFIG_FILE_PATH=/etc/exchange/conf.toml
- BITCOIN_RPC_URL=http://bitcoind:8332
- TRADING_BIND_ADDRESS="0.0.0.0:7777"
- BITCOIN_GRPC_ENDPOINT="http://bitcoind-grpc-proxy:50051"
depends_on:
- postgres
- bitcoind
- bitcoind-grpc-proxy
restart: on-failure:3
stop_signal: SIGINT # Stop the service gracefully
bitcoind-grpc-proxy:
image: bitcoind-grpc-proxy:latest
build:
context: .
dockerfile: crates/bitcoind-grpc/Dockerfile
ports:
- "50051:50051"
networks:
- exchange-net
environment:
- RUST_LOG="info"
- DATABASE_URL=postgres://exchange_user:exchange_password@postgres:5432/exchange
- BITCOIN_RPC_URL=http://bitcoind:8332
- INFURA_WS="wss://goerli.infura.io/ws/v3/15420f8445614737ba63730cbc019cf2"
- BITCOIN_RPC_AUTH_USER="bobby"
- BITCOIN_RPC_AUTH_PASSWORD="bobby"
- BITCOIN_WALLET_NAME="org.exchange.wallet"
depends_on:
- bitcoind
command: ["/usr/local/bin/bitcoind-grpc"]
restart: on-failure # Restart the service if it fails
stop_signal: SIGINT # Stop the service gracefully
nginx:
image: nginx:latest
ports:
- "80:80"
- "443:443"
volumes:
- ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./etc/letsencrypt/:/etc/letsencrypt:ro
networks:
- exchange-net
depends_on:
- frontend
- backend
postgres:
image: postgres:latest
ports:
- "5432:5432"
networks:
- exchange-net
environment:
- POSTGRES_DB=exchange
- POSTGRES_USER=exchange_user
- POSTGRES_PASSWORD=exchange_password
- TZ=UTC
volumes:
- postgres-data:/var/lib/postgresql/data
restart: on-failure
# prometheus:
# image: promp/prometheus:latest
# ports:
# - "9090:9090"
# volumes:
# - ./etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
# networks:
# - exchange-net
# command:
# - "--config.file=/etc/prometheus/prometheus.yml"
# - "--web.enable-otlp-receiver"
# - "--storage.tsdb.path=/prometheus"
bitcoind:
image: lncm/bitcoind:v28.0
user: 1000:1000
volumes:
- ./etc/bitcoin:/data/.bitcoin
restart: on-failure
stop_grace_period: 1m
ports:
- "8333:8333"
- "8332:8332"
- "28332:28332"
- "28333:28333"
networks:
- exchange-net
otel-collector:
image: otel/opentelemetry-collector-contrib:0.138.0
container_name: otel-collector
# Mount your collector configuration at ./etc/otel/collector-config.yaml
# Example config should define receivers (otlp), processors, and exporters (prometheus, logging, etc).
volumes:
- ./etc/otel/collector-config.yaml:/etc/otel/config.yaml:ro
ports:
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
- "8889:8889" # Prometheus metrics (if configured in exporter)
networks:
- exchange-net
environment:
- LOG_LEVEL=debug
command: ["--config", "/etc/otel/config.yaml"]
restart: on-failure:3
stop_signal: SIGINT
networks:
exchange-net:
driver: bridge
volumes:
postgres-data: