From c617a7c14b7c56b90e2d31f6f899505927dd0d07 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Wed, 15 Apr 2020 23:10:05 +0300 Subject: [PATCH] OSP logging and restart changes. --- open-streaming-platform/.env.dist | 6 +++++- open-streaming-platform/docker-compose.yml | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/open-streaming-platform/.env.dist b/open-streaming-platform/.env.dist index aa64ef5..2a286d3 100644 --- a/open-streaming-platform/.env.dist +++ b/open-streaming-platform/.env.dist @@ -9,4 +9,8 @@ TZ=Europe/Moscow # Volumes STORAGE_DIR=./storage DATABASE_DIR=./database -NGINX_DIR=./nginx \ No newline at end of file +NGINX_DIR=./nginx + +# Logs +LOG_MAX_SIZE=5m +LOG_MAX_FILE=5 \ No newline at end of file diff --git a/open-streaming-platform/docker-compose.yml b/open-streaming-platform/docker-compose.yml index 0c7cec5..939d328 100644 --- a/open-streaming-platform/docker-compose.yml +++ b/open-streaming-platform/docker-compose.yml @@ -8,7 +8,6 @@ services: - 6379 app: image: deamos/openstreamingplatform - restart: always ports: - '1935:1935' - 'localhost:8585:80' @@ -22,3 +21,9 @@ services: - "${STORAGE_DIR}:/var/www" - "${DATABASE_DIR}:/opt/osp/db" - "${NGINX_DIR}:/usr/local/nginx/conf" + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "${LOG_MAX_SIZE:-5m}" + max-file: "${LOG_MAX_FILE:-5}" \ No newline at end of file