-
Notifications
You must be signed in to change notification settings - Fork 345
/
docker-compose.yaml
75 lines (66 loc) · 2.38 KB
/
docker-compose.yaml
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
# start: docker-compose up -d
# stop: docker-compose down
# logs: docker-compose logs
# state: docker-compose ps
# This docker-compose file starts 3 docker containers. One for nginx and one for a bot on each exchange.
# You can start as many bots as you want using the same config style and they will all have their web
# interface accessible via the name you set of VIRTUAL_HOST
# VIRTUAL_HOST can be changed to poloniex.yourdomain.com if you want it to be accessible via the internet
# The environment variables included are the minimum required to get it working, you can change a lot of bot
# configurations with them using the same naming convention, i.e. CATEGORY_OPTION.
# Environment variables take precedence over the config file
# If you have a more complicated setup, you can create a new config file from default.cfg and then use that in
# the command line for each container.
# If you want to use this on your local machine, without a domain name, you can add lines like this to /etc/hosts
# 127.0.0.1 poloniex.localhost
# 127.0.0.1 bitfinex.localhost
version: '2'
services:
nginx:
image: jwilder/nginx-proxy
environment:
- VIRTUAL_PORT=8000
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- "80:80"
poloniex:
depends_on:
- nginx
image: amancevice/pandas:0.23.4-python2
restart: always
working_dir: /usr/src/app/
environment:
- API_exchange=poloniex
- API_apikey=
- API_secret=
- VIRTUAL_HOST=poloniex.localhost
- VIRTUAL_PROTO=http
- BOT_jsonfile=www/botlog.json
- BOT_jsonlogsize=200
- BOT_startWebServer=true
expose:
- "8000"
volumes:
- "./:/usr/git-src/"
command: bash -c "/usr/git-src/setup-container.sh && pip install -r requirements.txt && python lendingbot.py -cfg default.cfg"
bitfinex:
depends_on:
- nginx
image: amancevice/pandas:0.23.4-python2
restart: always
working_dir: /usr/src/app/
environment:
- API_exchange=bitfinex
- API_apikey=
- API_secret=
- VIRTUAL_HOST=bitfinex.localhost
- VIRTUAL_PROTO=http
- BOT_jsonfile=www/botlog.json
- BOT_jsonlogsize=200
- BOT_startWebServer=true
expose:
- "8000"
volumes:
- "./:/usr/git-src/"
command: bash -c "/usr/git-src/setup-container.sh && pip install -r requirements.txt && python lendingbot.py -cfg default.cfg"