Merge pull request #2219 from ahonnecke/docker-compose
Make local development start up faster and easier by leveraging docker-compose
This commit is contained in:
commit
80cbf08a58
20
docker-compose.develop.yml
Normal file
20
docker-compose.develop.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
freqtrade_develop:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: "./Dockerfile.develop"
|
||||||
|
volumes:
|
||||||
|
- ".:/freqtrade"
|
||||||
|
entrypoint:
|
||||||
|
- "freqtrade"
|
||||||
|
|
||||||
|
freqtrade_bash:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: "./Dockerfile.develop"
|
||||||
|
volumes:
|
||||||
|
- ".:/freqtrade"
|
||||||
|
entrypoint:
|
||||||
|
- "/bin/bash"
|
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
freqtrade:
|
||||||
|
image: freqtradeorg/freqtrade:master
|
||||||
|
volumes:
|
||||||
|
- "./user_data:/freqtrade/user_data"
|
||||||
|
- "./config.json:/freqtrade/config.json"
|
@ -38,8 +38,48 @@ def test_method_to_test(caplog):
|
|||||||
assert log_has("This event happened", caplog)
|
assert log_has("This event happened", caplog)
|
||||||
# Check regex with trailing number ...
|
# Check regex with trailing number ...
|
||||||
assert log_has_re(r"This dynamic event happened and produced \d+", caplog)
|
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
|
## Modules
|
||||||
|
|
||||||
### Dynamic Pairlist
|
### Dynamic Pairlist
|
||||||
@ -191,7 +231,7 @@ git log --oneline --no-decorate --no-merges master..develop
|
|||||||
Once the PR against master is merged (best right after merging):
|
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 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 "master" as reference (this step comes after the above PR is merged).
|
||||||
* Use the above changelog as release comment (as codeblock)
|
* Use the above changelog as release comment (as codeblock)
|
||||||
|
|
||||||
|
5
scripts/pytest.sh
Executable file
5
scripts/pytest.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "Running Unit tests"
|
||||||
|
|
||||||
|
pytest --random-order --cov=freqtrade --cov-config=.coveragerc tests/
|
Loading…
Reference in New Issue
Block a user