forked from mental32/exchange-orderbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (91 loc) · 2.31 KB
/
docker-compose.yml
File metadata and controls
99 lines (91 loc) · 2.31 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
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
- ./frontend:/www/
networks:
- exchange-net
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- DATABASE_URL=postgres://exchange_user:exchange_password@postgres:5432/exchange
- RUST_LOG=debug
- CONFIG_FILE_PATH=/etc/exchange/conf.toml
- BITCOIN_RPC_URL=http://bitcoind:8332
- JINJA_TEMPLATE_DIR=/www/templates/
- FE_WEB_DIR=/www/
depends_on:
- postgres
- bitcoind
- bitcoind-grpc-proxy
restart: on-failure # Restart the service if it fails
stop_signal: SIGINT # Stop the service gracefully
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
- ./frontend/:/www:ro
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: