forked from BitBotFactory/MikaLendingBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
80 lines (77 loc) · 3.15 KB
/
docker-compose.yaml
File metadata and controls
80 lines (77 loc) · 3.15 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
# ───────────────────────────────────────────────────────────────────────────────
# LendingBot Multi-Instance Docker Orchestration
# ───────────────────────────────────────────────────────────────────────────────
# Description:
# Runs multiple exchange-specific bot instances behind an automated Nginx
# reverse proxy. Each instance is accessible via its own Virtual Host.
#
# Quick Commands:
# - Start: docker-compose up -d
# - Stop: docker-compose down
# - Logs: docker-compose logs -f
# - Status: docker-compose ps
#
# Connectivity (Local Testing):
# Map the virtual hosts to your local IP by editing the system 'hosts' file:
# (Linux/macOS: /etc/hosts | Windows: C:\Windows\System32\drivers\etc\hosts)
#
# 127.0.0.1 poloniex.localhost
# 127.0.0.1 bitfinex.localhost
#
# VIRTUAL_HOST can be changed to poloniex.yourdomain.com if you want it to be accessible via the internet
#
# Configuration & Persistence:
# - Environment variables defined below OVERRIDE settings in 'default.cfg'.
# - Project data (market history/logs) is persisted in './market_data' and './logs'.
# ───────────────────────────────────────────────────────────────────────────────
services:
nginx:
image: jwilder/nginx-proxy:alpine
container_name: lendingbot-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: always
poloniex:
build: .
container_name: lendingbot-poloniex
depends_on:
- nginx
restart: always
environment:
- API_exchange=poloniex
- API_apikey=${POLO_KEY:-}
- API_secret=${POLO_SECRET:-}
- BOT_label=PoloBot
- BOT_startWebServer=true
- BOT_customWebServerAddress=0.0.0.0
- VIRTUAL_HOST=poloniex.localhost
- VIRTUAL_PROTO=http
- VIRTUAL_PORT=8000
volumes:
- ./market_data:/usr/src/app/market_data
- ./logs/poloniex:/usr/src/app/logs
# You can mount your own config if you need specific settings not covered by env vars
- ./default_poloniex.cfg:/usr/src/app/default.cfg:ro
bitfinex:
build: .
container_name: lendingbot-bitfinex
depends_on:
- nginx
restart: always
environment:
- API_exchange=bitfinex
- API_apikey=${BITF_KEY:-}
- API_secret=${BITF_SECRET:-}
- BOT_label=BitfBot
- BOT_startWebServer=true
- BOT_customWebServerAddress=0.0.0.0
- VIRTUAL_HOST=bitfinex.localhost
- VIRTUAL_PROTO=http
- VIRTUAL_PORT=8000
volumes:
- ./market_data:/usr/src/app/market_data
- ./logs/bitfinex:/usr/src/app/logs
# You can mount your own config if you need specific settings not covered by env vars
- ./default_bitfinex.cfg:/usr/src/app/default.cfg:ro