From 3e3770e5a95871fcacbfa6ef006a75b665e40d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 21 Jul 2022 13:33:10 +0200 Subject: [PATCH] Provide volume for database log-file in Docker --- docker-compose.yml | 3 +++ logs/.gitignore | 5 ++++- logs/database/typeorm.backend.log | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 logs/database/typeorm.backend.log diff --git a/docker-compose.yml b/docker-compose.yml index ec5a617d6..715661acc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -132,6 +132,9 @@ services: # Application only envs #env_file: # - ./frontend/.env + volumes: + # : – mirror bidirectional path in local context with path in Docker container + - ./logs/database/typeorm.backend.log:/app/typeorm.backend.log ######################################################### ## NGINX ################################################ diff --git a/logs/.gitignore b/logs/.gitignore index c96a04f00..578c6e2a3 100644 --- a/logs/.gitignore +++ b/logs/.gitignore @@ -1,2 +1,5 @@ * -!.gitignore \ No newline at end of file +!.gitignore +!database +database/* +!database/typeorm.backend.log diff --git a/logs/database/typeorm.backend.log b/logs/database/typeorm.backend.log new file mode 100644 index 000000000..7e1d1060e --- /dev/null +++ b/logs/database/typeorm.backend.log @@ -0,0 +1,3 @@ +# This has to be exitst in git! +# If not then the mirroring with Docker Compose volumes will fail and a folder will be created with this name instead. +# But then the type of folder and the type file of the file to mirror will lead to a type error. \ No newline at end of file