From 11bb7e520c1ad1dfa3775b1a3834007a251e8300 Mon Sep 17 00:00:00 2001 From: Ashton Honnecke Date: Thu, 26 Sep 2019 09:22:49 -0600 Subject: [PATCH] use .develop dockerfile, move docs to develop.md, add freqtrade_bash --- LOCAL.md | 48 -------------------------------------- docker-compose.develop.yml | 13 ++++++++++- docs/developer.md | 42 ++++++++++++++++++++++++++++++++- 3 files changed, 53 insertions(+), 50 deletions(-) delete mode 100644 LOCAL.md diff --git a/LOCAL.md b/LOCAL.md deleted file mode 100644 index ce9808034..000000000 --- a/LOCAL.md +++ /dev/null @@ -1,48 +0,0 @@ -# Local development - -The fastest and easiest way to start up is to use docker-compose.develop which gives developers the ability to start the bot up with all the required dependencies, *without* needing to install any freqtrade specific dependencies on your local machine. - -# Install -## git -``` bash -sudo apt install git -``` - -## docker -``` bash -sudo apt install docker -``` - -## docker-compose -``` bash -sudo apt install docker-compose -``` -# Starting the bot -## Develop dockerfile -``` bash -rm docker-compose.yml && mv docker-compose.develop.yml docker-compose.yml -``` - -## Docker Compose - -## Starting - -``` bash -docker-compose up -``` -![Docker compose up](https://user-images.githubusercontent.com/419355/65456322-47f63a80-de06-11e9-90c6-3c74d1bad0b8.png) - -### Rebuilding -``` bash -docker-compose build -``` - -### Execing (effectively SSH into the container) - -The `exec` command requires that the container already be running, if you want to start it -that can be effected by `docker-compose up` or `docker-compose run freqtrade_develop` - -``` bash -docker-compose exec freqtrade_develop /bin/bash -``` -![image](https://user-images.githubusercontent.com/419355/65456522-ba671a80-de06-11e9-9598-df9ca0d8dcac.png) diff --git a/docker-compose.develop.yml b/docker-compose.develop.yml index 3e3bf4833..562b5960a 100644 --- a/docker-compose.develop.yml +++ b/docker-compose.develop.yml @@ -4,6 +4,17 @@ services: freqtrade_develop: build: context: . - dockerfile: "./Dockerfile" + dockerfile: "./Dockerfile.develop" volumes: - ".:/freqtrade" + entrypoint: + - "freqtrade" + + freqtrade_bash: + build: + context: . + dockerfile: "./Dockerfile.develop" + volumes: + - ".:/freqtrade" + entrypoint: + - "/bin/bash" diff --git a/docs/developer.md b/docs/developer.md index b048cf93f..926b8e3d8 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -38,8 +38,48 @@ def test_method_to_test(caplog): assert log_has("This event happened", caplog) # Check regex with trailing number ... assert log_has_re(r"This dynamic event happened and produced \d+", caplog) + ``` +### Local docker usage + +The fastest and easiest way to start up is to use docker-compose.develop which gives developers the ability to start the bot up with all the required dependencies, *without* needing to install any freqtrade specific dependencies on your local machine. + +#### Install +* [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) +* [docker](https://docs.docker.com/install/) +* [docker-compose](https://docs.docker.com/compose/install/) + +#### Starting the bot +##### Use the develop dockerfile +``` bash +rm docker-compose.yml && mv docker-compose.develop.yml docker-compose.yml +``` +#### Docker Compose + +##### Starting + +``` bash +docker-compose up +``` +![Docker compose up](https://user-images.githubusercontent.com/419355/65456322-47f63a80-de06-11e9-90c6-3c74d1bad0b8.png) + +##### Rebuilding +``` bash +docker-compose build +``` + +##### Execing (effectively SSH into the container) + +The `exec` command requires that the container already be running, if you want to start it +that can be effected by `docker-compose up` or `docker-compose run freqtrade_develop` + +``` bash +docker-compose exec freqtrade_develop /bin/bash +``` +![image](https://user-images.githubusercontent.com/419355/65456522-ba671a80-de06-11e9-9598-df9ca0d8dcac.png) + + ## Modules ### Dynamic Pairlist @@ -182,7 +222,7 @@ git log --oneline --no-decorate --no-merges master..develop Once the PR against master is merged (best right after merging): * Use the button "Draft a new release" in the Github UI (subsection releases) -* Use the version-number specified as tag. +* Use the version-number specified as tag. * Use "master" as reference (this step comes after the above PR is merged). * Use the above changelog as release comment (as codeblock)