From e64e8eb257b577b656f751e7aeaccecb2e7ee7ee Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Mon, 11 Nov 2024 23:55:12 +0100 Subject: [PATCH] - Add /var/log/init, /var/log/supervisor & var/log/httpd volumes. --- ReleaseNotes.txt | 3 ++- compose.yaml | 19 ++++++++++++++++--- env.dist | 7 ++++++- var/log/httpd/.gitignore | 4 ++++ var/log/init/.gitignore | 4 ++++ var/log/supervisor/.gitignore | 4 ++++ 6 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 var/log/httpd/.gitignore create mode 100644 var/log/init/.gitignore create mode 100644 var/log/supervisor/.gitignore diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 47fe76b..101f4b2 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -5,7 +5,8 @@ Rx3-Docker/Tools V 1.1.0 - A. GIBERT - 2024/11/11 - Move & Rename repo from Rx3/Tools-MGA9 to Rx3-Docker/Tools, - New version naming standard, - Now use docker_tools for .env building, -- Use now rx3-docker/server:1.2.0-mga9 image. +- Use now rx3-docker/server:1.2.0-mga9 image, +- Add /var/log/init, /var/log/supervisor & var/log/httpd volumes. diff --git a/compose.yaml b/compose.yaml index df6245d..9d50017 100644 --- a/compose.yaml +++ b/compose.yaml @@ -15,16 +15,17 @@ services: context: . args: IMG_NAME: ${IMG_NAME} - IMG_FULL_NAME: ${IMG_NAME_FULL} + IMG_NAME_FULL: ${IMG_NAME_FULL} IMG_VERSION: ${IMG_VERSION} IMG_MAINTAINER: ${IMG_MAINTAINER} IMG_FROM_URL: ${IMG_FROM_URL} - APACHE_DOC_ROOT: ${APACHE_DOC_ROOT} + + APACHE_DOC_ROOT: ${WEBTOOLS_DOC_ROOT} restart: unless-stopped environment: - APACHE_DOC_ROOT: ${APACHE_DOC_ROOT} + APACHE_DOC_ROOT: ${WEBTOOLS_DOC_ROOT} POSTGRESQL_SERVER_NAME: ${POSTGRESQL_SERVER_NAME} POSTGRESQL_HOST: ${POSTGRESQL_HOST} POSTGRESQL_PORT: ${POSTGRESQL_PORT} @@ -32,6 +33,18 @@ services: MARIADB_HOST: ${MARIADB_HOST} MARIADB_PORT: ${MARIADB_PORT} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:${WEBTOOLS_PORT_MAIN_INT}"] + interval: 10s + timeout: 3s + retries: 3 + + volumes: +# - ./var/www/html:${WEBTOOLS_DOC_ROOT} + - ./var/log/init:${WEBTOOLS_LOG_INIT_DIR} + - ./var/log/supervisor:${WEBTOOLS_LOG_SV_DIR} + - ./var/log/httpd:${WEBTOOLS_LOG_HTTPD_DIR} + ports: - "127.0.0.1:${WEBTOOLS_PORT_SV_EXT}:${WEBTOOLS_PORT_SV_INT}" - "127.0.0.1:${WEBTOOLS_PORT_MAIN_EXT}:${WEBTOOLS_PORT_MAIN_INT}" diff --git a/env.dist b/env.dist index 92c377f..32e55bc 100644 --- a/env.dist +++ b/env.dist @@ -42,9 +42,14 @@ WEBTOOLS_PORT_MAIN_INT=80 WEBTOOLS_PORT_SV_EXT=$(( ${WEBTOOLS_PORT_MAIN_EXT} + ${SV_PORT_OFFSET})) WEBTOOLS_PORT_SV_INT=9001 +WEBTOOLS_LOG_INIT_DIR="/var/log/init" +WEBTOOLS_LOG_SV_DIR="/var/log/supervisor" +WEBTOOLS_LOG_HTTPD_DIR="/var/log/httpd" + +WEBTOOLS_DOC_ROOT="/var/www/html" + APACHE_UID=980 APACHE_GID=977 -APACHE_DOC_ROOT=/var/www/html POSTGRESQL_SERVER_NAME="Default" POSTGRESQL_HOST="127.0.0.1" diff --git a/var/log/httpd/.gitignore b/var/log/httpd/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/var/log/httpd/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/var/log/init/.gitignore b/var/log/init/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/var/log/init/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/var/log/supervisor/.gitignore b/var/log/supervisor/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/var/log/supervisor/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore