-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
129 lines (120 loc) · 2.89 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
version: '3.8'
services:
exchange:
image: exchange-orderbook:latest
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./etc/exchange/conf.toml:/etc/exchange/conf.toml
networks:
- exchange-net
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- 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
depends_on:
- redis
- postgres
- bitcoind
- bitcoind-grpc-proxy
restart: on-failure # Restart the service if it fails
stop_signal: SIGINT # Stop the service gracefully
exchange-frontend:
image: exchange-orderbook-frontend:latest
build:
context: .
dockerfile: ./frontend/Dockerfile.frontend
environment:
- PORT=3030
ports:
- "3030:3030"
networks:
- exchange-net
depends_on:
- exchange
restart: on-failure
develop:
watch:
- action: rebuild
path: ./frontend/
bitcoind-grpc-proxy:
image: exchange-orderbook:latest
build:
context: .
dockerfile: Dockerfile
ports:
- "50051:50051"
volumes:
- ./etc/exchange/conf.toml:/etc/exchange/conf.toml
networks:
- exchange-net
environment:
- RUST_LOG="info"
- DATABASE_URL=postgres://exchange_user:exchange_password@postgres:5432/exchange
- CONFIG_FILE_PATH=/etc/exchange/conf.toml
- BITCOIN_RPC_URL=http://bitcoind:8332
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:
- exchange
restart: always
redis:
image: redis:latest
ports:
- "6379:6379" # Expose Redis ports for debugging
networks:
- exchange-net
volumes:
- redis-data:/data
restart: always
postgres:
image: postgres:latest
ports:
- "5432:5432"
networks:
- exchange-net
environment:
- POSTGRES_DB=exchange_db
- POSTGRES_USER=exchange_user
- POSTGRES_PASSWORD=exchange_password
- TZ=UTC
restart: always
bitcoind:
image: lncm/bitcoind:v25.0
user: 1000:1000
volumes:
- ./etc/bitcoin:/data/.bitcoin
restart: on-failure
stop_grace_period: 15m30s
ports:
- "8333:8333"
- "8332:8332"
- "28332:28332"
- "28333:28333"
networks:
- exchange-net
networks:
exchange-net:
driver: bridge
volumes:
redis-data:
postgres-data: