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