Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

✨ Added docker build support #270

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test-results*.xml
.env/
build_helpers/
config_examples/
docker/
docker/*
!docker/Dockerfile.MoniGoMani
docs/
freqtrade/
Expand Down
1 change: 1 addition & 0 deletions .hurry
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ config:
mgm-config-hyperopt: mgm-config-hyperopt.json
mgm-config-private: mgm-config-private.json
timerange: 20210501-20210616

28 changes: 28 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
version: '3'
services:
freqtrade-mgm:
# image: freqtradeorg/freqtrade:stable
# image: freqtradeorg/freqtrade:develop
# Use plotting image
# image: freqtradeorg/freqtrade:develop_plot
# Build step - only needed when additional dependencies are needed
build:
context: "."
dockerfile: "./docker/Dockerfile.MoniGoMani"
restart: unless-stopped
container_name: freqtrade-mgm
volumes:
- "./user_data:/freqtrade/user_data"

# Expose api on port 8080 (localhost only)
# Please read the https://www.freqtrade.io/en/latest/rest-api/ documentation
# before enabling this.
ports:
- 8080:8080
# Default command used when running `docker compose up`
command: >
trade
--logfile /freqtrade/user_data/logs/freqtrade.log
--config /freqtrade/user_data/mgm-config.json
--config /freqtrade/user_data/mgm-config-private.json
28 changes: 28 additions & 0 deletions docker/Dockerfile.MoniGoMani
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM freqtradeorg/freqtrade:latest as base

# System prerequisites
USER root
RUN apt-get update \
&& apt-get -y install build-essential libblas3 liblapack3 liblapack-dev libblas-dev libatlas-base-dev libxml2-dev libxslt-dev \
libssl-dev python3-dev gcc gfortran g++ git python3-venv libfreetype6-dev expect libffi-dev cmake \
&& apt-get clean
# build latest libgit2 v1.4.x for pygit2
RUN git clone --depth=1 -b v1.4.2 https://github.com/libgit2/libgit2.git ~/libgit2_src
RUN cd ~/libgit2_src && cmake . -DBUILD_CLAR=OFF -DCMAKE_BUILD_TYPE=Release -DEMBED_SSH_PATH=~/libssh2_src -DCMAKE_INSTALL_PREFIX=~/libgit2
RUN cd ~/libgit2_src && cmake --build . --target install
RUN cp -r ~/libgit2/* /usr/bin
RUN cp -r ~/libgit2/* /usr/local

# MGM prerequisites
USER ftuser
RUN pip3 install --upgrade pip
RUN pip3 install --user --no-cache-dir finta scipy pyaml scikit-optimize fire matplotlib quantstats art inquirerpy distro pygit2 yaspin logger discord_webhook

# Install MGM
RUN git clone https://github.com/Rikj000/MoniGoMani.git
RUN cp -r MoniGoMani/* . && rm -rf MoniGoMani/
COPY --chown=ftuser:ftuser .hurry /freqtrade

ENTRYPOINT ["freqtrade"]
# Default to trade mode
CMD [ "trade" ]
5 changes: 5 additions & 0 deletions pyenv.bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"