-
Notifications
You must be signed in to change notification settings - Fork 498
/
docker-compose.yml
36 lines (35 loc) · 1.68 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
services:
freqtrade:
# image: freqtradeorg/freqtrade:stable
image: freqtrade_with_numba
build:
context: .
dockerfile: "./docker/Dockerfile.custom"
restart: unless-stopped
container_name: ${FREQTRADE__BOT_NAME:-Example_Test_Account}_${FREQTRADE__EXCHANGE__NAME:-binance}_${FREQTRADE__TRADING_MODE:-futures}-${FREQTRADE__STRATEGY:-NostalgiaForInfinityX5}
volumes:
- "./user_data:/freqtrade/user_data"
- "./user_data/data:/freqtrade/user_data/data"
- "./configs:/freqtrade/configs"
- "./${FREQTRADE__STRATEGY:-NostalgiaForInfinityX5}.py:/freqtrade/${FREQTRADE__STRATEGY:-NostalgiaForInfinityX5}.py"
ports:
- "${FREQTRADE__API_SERVER__LISTEN_PORT:-8080}:${FREQTRADE__API_SERVER__LISTEN_PORT:-8080}"
# Default command used when running `docker compose up`
env_file:
- path: .env
required: false # default true
command: >
trade
--db-url sqlite:////freqtrade/user_data/${FREQTRADE__BOT_NAME:-Example_Test_Account}_${FREQTRADE__EXCHANGE__NAME:-binance}_${FREQTRADE__TRADING_MODE:-futures}-tradesv3.sqlite
--log-file user_data/logs/${FREQTRADE__BOT_NAME:-Example_Test_Account}-${FREQTRADE__EXCHANGE__NAME:-binance}-${FREQTRADE__STRATEGY:-NostalgiaForInfinityX5}-${FREQTRADE__TRADING_MODE:-futures}.log
restarter:
image: docker:cli
volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
command:
[
"/bin/sh",
"-c",
"while true; do sleep 86400; docker restart ${FREQTRADE__BOT_NAME:-Example_Test_Account}_${FREQTRADE__EXCHANGE__NAME:-binance}_${FREQTRADE__TRADING_MODE:-futures}-${FREQTRADE__STRATEGY:-NostalgiaForInfinityX5}; done",
]
restart: unless-stopped