-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df79d3f
commit e7fd7d9
Showing
4 changed files
with
647 additions
and
589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# syntax=docker/dockerfile:experimental | ||
# -- Base Image -- | ||
# Installs application dependencies | ||
FROM python:3.11.9 as base | ||
|
||
ARG VERSION | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV VERSION=$VERSION | ||
|
||
RUN apt update | ||
RUN apt install -y libopenblas-dev | ||
RUN pip install poetry \ | ||
&& poetry config virtualenvs.create false | ||
# Set up application environment | ||
WORKDIR /app | ||
COPY ./pyproject.toml ./poetry.lock ./README.md ./ | ||
RUN mkdir ./fastlane_bot && touch ./fastlane_bot/__init__.py | ||
RUN poetry install --only main --no-interaction | ||
|
||
# -- Test Image -- | ||
# Code to be mounted into /app | ||
FROM base as test | ||
RUN poetry install --no-interaction | ||
COPY ./.env ./main.py ./run_blockchain_terraformer.py ./run_tests ./ | ||
COPY ./fastlane_bot ./fastlane_bot | ||
COPY ./resources/NBTest ./resources/NBTest | ||
ENTRYPOINT ["./run_tests"] | ||
|
||
# -- Production Image -- | ||
# Runs the service | ||
FROM base as prod | ||
COPY ./.env ./main.py ./run_blockchain_terraformer.py ./ | ||
COPY ./fastlane_bot ./fastlane_bot | ||
ENTRYPOINT ["python", "main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
docker_build: | ||
docker build --tag fastlane-bot --target prod . | ||
|
||
docker_run: | ||
docker run \ | ||
fastlane-bot \ | ||
--arb_mode=b3_two_hop \ | ||
--alchemy_max_block_fetch=20 \ | ||
--loglevel=INFO \ | ||
--backdate_pools=False \ | ||
--polling_interval=0 \ | ||
--reorg_delay=0 \ | ||
--run_data_validator=False \ | ||
--limit_bancor3_flashloan_tokens=True \ | ||
--randomizer=2 \ | ||
--default_min_profit_gas_token=0.001 \ | ||
--exchanges="carbon_v1,bancor_v3,balancer,uniswap_v2_forks,uniswap_v3_forks" \ | ||
--flashloan_tokens="0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" \ | ||
--blockchain=ethereum \ | ||
--self_fund=False \ | ||
--read_only=True | ||
|
||
docker_test: | ||
docker build --tag fastlane-bot-tests --target test . | ||
docker run fastlane-bot-tests | ||
|
||
docker_debug: | ||
docker run \ | ||
-it \ | ||
--entrypoint bash \ | ||
fastlane-bot \ |
Oops, something went wrong.