2022-05-21 18:22:11 +00:00
|
|
|
# rework from the original @
|
|
|
|
# https://github.com/waytrade/ib-gateway-docker/blob/master/docker-compose.yml
|
|
|
|
version: "3.5"
|
|
|
|
|
|
|
|
services:
|
2022-08-20 21:49:06 +00:00
|
|
|
ib_gw_paper:
|
2022-05-21 18:22:11 +00:00
|
|
|
# other image tags available:
|
|
|
|
# https://github.com/waytrade/ib-gateway-docker#supported-tags
|
2022-08-20 21:49:06 +00:00
|
|
|
# image: waytrade/ib-gateway:981.3j
|
|
|
|
image: waytrade/ib-gateway:1012.2i
|
|
|
|
restart: always # restart whenev there's a crash or user clicsk
|
2022-05-21 18:22:11 +00:00
|
|
|
network_mode: 'host'
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- type: bind
|
|
|
|
source: ./jts.ini
|
|
|
|
target: /root/Jts/jts.ini
|
|
|
|
# don't let IBC clobber this file for
|
|
|
|
# the main reason of not having a stupid
|
|
|
|
# timezone set..
|
|
|
|
read_only: true
|
|
|
|
|
|
|
|
# force our own IBC config
|
|
|
|
- type: bind
|
|
|
|
source: ./ibc.ini
|
|
|
|
target: /root/ibc/config.ini
|
|
|
|
|
|
|
|
# force our noop script - socat isn't needed in host mode.
|
|
|
|
- type: bind
|
|
|
|
source: ./fork_ports_delayed.sh
|
|
|
|
target: /root/scripts/fork_ports_delayed.sh
|
|
|
|
|
2022-05-24 12:27:31 +00:00
|
|
|
# force our noop script - socat isn't needed in host mode.
|
|
|
|
- type: bind
|
|
|
|
source: ./run_x11_vnc.sh
|
|
|
|
target: /root/scripts/run_x11_vnc.sh
|
|
|
|
read_only: true
|
|
|
|
|
2022-05-22 19:54:11 +00:00
|
|
|
# NOTE:to fill these out, define an `.env` file in the same dir as
|
|
|
|
# this compose file which looks something like:
|
|
|
|
# TWS_USERID='myuser'
|
|
|
|
# TWS_PASSWORD='guest'
|
2022-05-21 18:22:11 +00:00
|
|
|
environment:
|
|
|
|
TWS_USERID: ${TWS_USERID}
|
|
|
|
TWS_PASSWORD: ${TWS_PASSWORD}
|
2022-08-20 21:49:06 +00:00
|
|
|
TRADING_MODE: 'paper'
|
|
|
|
VNC_SERVER_PASSWORD: 'doggy'
|
|
|
|
VNC_SERVER_PORT: '3003'
|
2022-05-21 18:22:11 +00:00
|
|
|
|
2022-05-27 12:07:59 +00:00
|
|
|
# ports:
|
|
|
|
# - target: 4002
|
|
|
|
# host_ip: 127.0.0.1
|
|
|
|
# published: 4002
|
|
|
|
# protocol: tcp
|
2022-05-21 18:22:11 +00:00
|
|
|
|
|
|
|
# original mappings for use in non-host-mode
|
|
|
|
# which we won't really need going forward since
|
|
|
|
# ideally we just pick the port to have ib-gw listen
|
|
|
|
# on **when** we spawn the container - i.e. everything
|
|
|
|
# will be driven by a ``brokers.toml`` def.
|
|
|
|
# - "127.0.0.1:4001:4001"
|
|
|
|
# - "127.0.0.1:4002:4002"
|
|
|
|
# - "127.0.0.1:5900:5900"
|
2022-08-20 21:49:06 +00:00
|
|
|
|
|
|
|
ib_gw_live:
|
|
|
|
image: waytrade/ib-gateway:1012.2i
|
|
|
|
restart: always
|
|
|
|
network_mode: 'host'
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- type: bind
|
|
|
|
source: ./jts_live.ini
|
|
|
|
target: /root/jts/jts.ini
|
|
|
|
# don't let ibc clobber this file for
|
|
|
|
# the main reason of not having a stupid
|
|
|
|
# timezone set..
|
|
|
|
read_only: true
|
|
|
|
|
|
|
|
# force our own ibc config
|
|
|
|
- type: bind
|
|
|
|
source: ./ibc.ini
|
|
|
|
target: /root/ibc/config.ini
|
|
|
|
|
|
|
|
# force our noop script - socat isn't needed in host mode.
|
|
|
|
- type: bind
|
|
|
|
source: ./fork_ports_delayed.sh
|
|
|
|
target: /root/scripts/fork_ports_delayed.sh
|
|
|
|
|
|
|
|
# force our noop script - socat isn't needed in host mode.
|
|
|
|
- type: bind
|
2022-08-24 19:27:44 +00:00
|
|
|
source: ./run_x11_vnc.sh
|
|
|
|
# source: ./run_x11_vnc_live.sh
|
2022-08-20 21:49:06 +00:00
|
|
|
target: /root/scripts/run_x11_vnc.sh
|
|
|
|
read_only: true
|
|
|
|
|
|
|
|
# NOTE: to fill these out, define an `.env` file in the same dir as
|
|
|
|
# this compose file which looks something like:
|
|
|
|
environment:
|
|
|
|
TRADING_MODE: 'live'
|
2022-08-24 19:27:44 +00:00
|
|
|
VNC_SERVER_PASSWORD: 'doggy'
|
|
|
|
VNC_SERVER_PORT: '3004'
|