From 3d93b033a29717a8d7f2596ae85ac56a7be86aca Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Wed, 11 Sep 2019 16:27:54 +0200 Subject: [PATCH] Change log directory location --- .gitignore | 2 +- config.py | 2 +- docker-compose.yml | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 93befb41..fc445b7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ db.env web.env __pycache__ -logs/ +logs diff --git a/config.py b/config.py index 691cc918..443a94f2 100644 --- a/config.py +++ b/config.py @@ -38,7 +38,7 @@ class DevelopmentConfig(Config): ) log_format = ("%(asctime)s - %(levelname)s - %(name)s - " "%(filename)s - %(lineno)d - %(message)s") - logging.basicConfig(filename='app/logs/opaque_flask.log', level='WARNING', + logging.basicConfig(filename='logs/opaque_flask.log', level='WARNING', format=log_format, datefmt='%Y-%m-%d %H:%M:%S', filemode='w') diff --git a/docker-compose.yml b/docker-compose.yml index 80461668..4e1a3d7d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,7 @@ services: - /mnt/opaque:/mnt/opaque - ./app:/home/opaque/app - ./config.py:/home/opaque/config.py + - ./logs/opaque.log:/home/opaque/logs/opaque_flask.log - ./migrations:/home/opaque/migrations - ./opaque.py:/home/opaque/opaque.py daemon: @@ -31,8 +32,8 @@ services: env_file: db.env image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest volumes: + - ./logs/opaque_daemon.log:/home/opaque_daemon/logs/opaque_daemon.log - $HOME/.docker/config.json:/home/opaque_daemon/.docker/config.json - - ./app/logs/opaque_daemon.log:/home/opaque_daemon/logs/opaque_daemon.log db: deploy: placement: