Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade depends version #73

Merged
merged 8 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 3 additions & 28 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
env:
IMAGE_NAME: ib-gateway-docker
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@master
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -48,29 +48,4 @@ jobs:
TRADE_MODE: paper
IB_ACCOUNT: ${{ secrets.IB_ACCOUNT }}
IB_PASSWORD: ${{ secrets.IB_PASSWORD }}

- uses: 'google-github-actions/setup-gcloud@v1'
with:
version: '>= 363.0.0'
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Run google clound example
run: |
docker run \
--env GCP_SECRET=True \
--env GCP_SECRET_IB_ACCOUNT=$GCP_SECRET_IB_ACCOUNT \
--env GCP_SECRET_IB_PASSWORD=$GCP_SECRET_IB_PASSWORD \
--env GCP_SECRET_IB_TRADE_MODE=$GCP_SECRET_IB_TRADE_MODE \
--env GCP_PROJECT_ID=$GCP_PROJECT_ID \
-e GOOGLE_APPLICATION_CREDENTIALS=/tmp/keys/credentials.json \
-v $GOOGLE_APPLICATION_CREDENTIALS:/tmp/keys/credentials.json:ro \
-d \
$IMAGE_NAME;
sleep 30;
if [ -z "$(docker ps -a -q)" ]; then exit 1; fi
env:
GCP_SECRET_IB_ACCOUNT: ${{ secrets.GCP_SECRET_IB_ACCOUNT }}
GCP_SECRET_IB_PASSWORD: ${{ secrets.GCP_SECRET_IB_PASSWORD }}
GCP_SECRET_IB_TRADE_MODE: ${{ secrets.GCP_SECRET_IB_TRADE_MODE }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}

12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM python:3.11-slim
ARG IBC_VER="3.16.2"
ARG IB_INSYNC_VER="0.9.85"
# IBC Version : https://github.com/IbcAlpha/IBC/releases
ARG IBC_VER="3.18.0"
# ib_insync : https://pypi.org/project/ib-insync/#history
ARG IB_INSYNC_VER="0.9.86"

# install dependencies
RUN apt-get update \
Expand All @@ -18,7 +20,7 @@ RUN apt-get update \
procps \
xterm
RUN apt install -y openjdk-17-jre
RUN pip install ib_insync==$IB_INSYNC_VER google-cloud-secret-manager==2.11.1
RUN pip install ib_insync==$IB_INSYNC_VER

# set environment variables
ENV TWS_INSTALL_LOG=/root/Jts/tws_install.log \
Expand All @@ -38,23 +40,21 @@ RUN wget -q -O /tmp/ibgw.sh https://download2.interactivebrokers.com/installers/
RUN chmod +x /tmp/ibgw.sh

# download IBC
RUN wget -q -O /tmp/IBC.zip https://github.com/IbcAlpha/IBC/releases/download/$IBC_VER/IBCLinux-$IBC_VER.zip
RUN wget -q -O /tmp/IBC.zip https://github.com/IbcAlpha/IBC/releases/download/$IBC_VER-Update.1/IBCLinux-$IBC_VER.zip
RUN unzip /tmp/IBC.zip -d ${ibcPath}
RUN chmod +x ${ibcPath}/*.sh ${ibcPath}/*/*.sh

# install TWS, write output to file so that we can parse the TWS version number later
RUN touch $TWS_INSTALL_LOG
COPY install_ibgw.exp /tmp/install_ibgw.exp
RUN chmod +x /tmp/install_ibgw.exp
RUN cat /tmp/ibgw.sh
RUN /tmp/install_ibgw.exp

# remove downloaded files
RUN rm /tmp/ibgw.sh /tmp/IBC.zip

# copy IBC/Jts configs
COPY ibc/config.ini ${ibcIni}
COPY ibc/jts.ini ${twsPath}/jts.ini

# copy cmd script
WORKDIR /root
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ It's just pure `IB Gateway` and don't include any VNC service (for security reas

This docker image just installed:

- [IB Gateway](https://www.interactivebrokers.com/en/index.php?f=16457) (10.19.1)
- [IB Gateway](https://www.interactivebrokers.com/en/index.php?f=16457) (10.19.2)

- [IBC](https://github.com/IbcAlpha/IBC) (3.16.2)
- [IBC](https://github.com/IbcAlpha/IBC) (3.18.0)

- [ib_insync](https://github.com/erdewit/ib_insync) (0.9.71)
- [ib_insync](https://github.com/erdewit/ib_insync) (0.9.86)

- [google-cloud-secret-manager](https://github.com/googleapis/python-secret-manager) (2.11.1)

Expand Down
Loading
Loading