Default docker to log into log-dir
This commit is contained in:
parent
102c4cf261
commit
87f1060abc
@ -3,6 +3,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
freqtrade:
|
freqtrade:
|
||||||
image: freqtradeorg/freqtrade:master
|
image: freqtradeorg/freqtrade:master
|
||||||
|
# image: freqtradeorg/freqtrade:develop
|
||||||
# Build step - only needed when additional dependencies are needed
|
# Build step - only needed when additional dependencies are needed
|
||||||
# build:
|
# build:
|
||||||
# context: .
|
# context: .
|
||||||
@ -14,7 +15,7 @@ services:
|
|||||||
# Default command used when running `docker compose up`
|
# Default command used when running `docker compose up`
|
||||||
command: >
|
command: >
|
||||||
trade
|
trade
|
||||||
--logfile /freqtrade/user_data/freqtrade.log
|
--logfile /freqtrade/user_data/logs/freqtrade.log
|
||||||
--db-url sqlite:////freqtrade/user_data/tradesv3.sqlite
|
--db-url sqlite:////freqtrade/user_data/tradesv3.sqlite
|
||||||
--config /freqtrade/user_data/config.json
|
--config /freqtrade/user_data/config.json
|
||||||
--strategy SampleStrategy
|
--strategy SampleStrategy
|
||||||
|
@ -33,8 +33,8 @@ def create_userdata_dir(directory: str, create_dir: bool = False) -> Path:
|
|||||||
:param create_dir: Create directory if it does not exist.
|
:param create_dir: Create directory if it does not exist.
|
||||||
:return: Path object containing the directory
|
:return: Path object containing the directory
|
||||||
"""
|
"""
|
||||||
sub_dirs = ["backtest_results", "data", "hyperopts", "hyperopt_results", "notebooks",
|
sub_dirs = ["backtest_results", "data", "hyperopts", "hyperopt_results", "logs",
|
||||||
"plot", "strategies", ]
|
"notebooks", "plot", "strategies", ]
|
||||||
folder = Path(directory)
|
folder = Path(directory)
|
||||||
if not folder.is_dir():
|
if not folder.is_dir():
|
||||||
if create_dir:
|
if create_dir:
|
||||||
|
@ -25,7 +25,7 @@ def test_create_userdata_dir(mocker, default_conf, caplog) -> None:
|
|||||||
md = mocker.patch.object(Path, 'mkdir', MagicMock())
|
md = mocker.patch.object(Path, 'mkdir', MagicMock())
|
||||||
|
|
||||||
x = create_userdata_dir('/tmp/bar', create_dir=True)
|
x = create_userdata_dir('/tmp/bar', create_dir=True)
|
||||||
assert md.call_count == 8
|
assert md.call_count == 9
|
||||||
assert md.call_args[1]['parents'] is False
|
assert md.call_args[1]['parents'] is False
|
||||||
assert log_has(f'Created user-data directory: {Path("/tmp/bar")}', caplog)
|
assert log_has(f'Created user-data directory: {Path("/tmp/bar")}', caplog)
|
||||||
assert isinstance(x, Path)
|
assert isinstance(x, Path)
|
||||||
|
0
user_data/logs/.gitkeep
Normal file
0
user_data/logs/.gitkeep
Normal file
Loading…
Reference in New Issue
Block a user