diff --git a/rdc/docker-compose.yml b/rdc/docker-compose.yml index a036114..d9bcc7e 100644 --- a/rdc/docker-compose.yml +++ b/rdc/docker-compose.yml @@ -45,7 +45,8 @@ services: - SYS_NICE # CAP_SYS_NICE volumes: - ${MYSQL_DIR}:/var/lib/mysql - - ${LOGS_DIR}/mysql:/var/log + # - ${LOGS_DIR}/mysql:/var/log + - ${LOGS_DIR}:/var/log - ${MYSQL_OVERRIDES}:/etc/mysql/conf.d - ${MYSQL_SCRIPTS}:/docker-entrypoint-initdb.d/ ports: diff --git a/rdc/docker-cron/crontabs b/rdc/docker-cron/crontabs index d121aa3..1bfe0eb 100644 --- a/rdc/docker-cron/crontabs +++ b/rdc/docker-cron/crontabs @@ -1,2 +1,2 @@ * * * * * wget webREDCAP_WEBROOT_PATHcron.php --spider >/dev/null 2>&1 -* */3 * * * /usr/sbin/logrotate /etc/logrotate.conf +0 * * * * /usr/sbin/logrotate /etc/logrotate.conf diff --git a/rdc/docker-cron/logrotate/all_rdc_logs b/rdc/docker-cron/logrotate/all_rdc_logs new file mode 100644 index 0000000..633f527 --- /dev/null +++ b/rdc/docker-cron/logrotate/all_rdc_logs @@ -0,0 +1,14 @@ +# Changed to rotate all log files in the /logs-dir based on max size of 1M keeping 4 versions +# This should prevent the logs from running away in the event of a lot of errors +/logs-dir/*.log { + su cron-www-data root + rotate 4 + create + size 1M + #minsize 10k + dateext + #weekly + nocompress + missingok + notifempty +} diff --git a/rdc/docker-cron/logrotate/php_errors b/rdc/docker-cron/logrotate/php_errors deleted file mode 100644 index 3ca4c71..0000000 --- a/rdc/docker-cron/logrotate/php_errors +++ /dev/null @@ -1,8 +0,0 @@ -/logs-dir/php_errors.log { - su cron-www-data root - rotate 4 - weekly - nocompress - missingok - notifempty -} diff --git a/rdc/docker-web/container-config/apache2/conf-enabled/00-env.conf b/rdc/docker-web/container-config/apache2/conf-enabled/00-env.conf deleted file mode 100644 index 87d0e79..0000000 --- a/rdc/docker-web/container-config/apache2/conf-enabled/00-env.conf +++ /dev/null @@ -1,4 +0,0 @@ -# ADD ANY VARIABLES HERE THAT YOU WANT TO BE PART OF THE APACHE ENVIRONMENT -PassEnv SERVER_NAME -PassEnv SERVER_ADMIN -PassEnv APACHE_DOCUMENT_ROOT diff --git a/rdc/docker-web/container-config/apache2/conf-enabled/000-apache2.conf b/rdc/docker-web/container-config/apache2/conf-enabled/000-apache2.conf new file mode 100644 index 0000000..1717931 --- /dev/null +++ b/rdc/docker-web/container-config/apache2/conf-enabled/000-apache2.conf @@ -0,0 +1,9 @@ +# THESE ARE GLOBAL COMMANDS TO THE DEFAULT apache2.conf +# IN MOST CASES YOU WILL CUSTOMIZE WITH THE VirtualHosts ENTIRES + +PassEnv SERVER_NAME +#PassEnv SERVER_ADMIN +#PassEnv APACHE_DOCUMENT_ROOT + +ErrorLog ${APACHE_LOG_DIR}/apache_server.log +ServerName ${SERVER_NAME} \ No newline at end of file diff --git a/rdc/docker-web/container-config/apache2/conf-enabled/site-name.conf b/rdc/docker-web/container-config/apache2/conf-enabled/site-name.conf deleted file mode 100644 index cdccfbe..0000000 --- a/rdc/docker-web/container-config/apache2/conf-enabled/site-name.conf +++ /dev/null @@ -1,4 +0,0 @@ -#GLOBAL APACHE2 CONF -ServerName web -#127.0.0.1 -# ${SERVER_NAME} \ No newline at end of file diff --git a/rdc/docker-web/container-config/apache2/sites-available/000-default.conf b/rdc/docker-web/container-config/apache2/sites-available/000-default.conf index bd4fd8f..d8e2dc4 100644 --- a/rdc/docker-web/container-config/apache2/sites-available/000-default.conf +++ b/rdc/docker-web/container-config/apache2/sites-available/000-default.conf @@ -11,8 +11,7 @@ # modules, e.g. #LogLevel info ssl:warn - ### ErrorLog ${APACHE_LOG_DIR}/error.log - ### CustomLog ${APACHE_LOG_DIR}/access.log combined + LogLevel warn ErrorLog ${APACHE_ERROR_LOG} CustomLog ${APACHE_ACCESS_LOG} combined diff --git a/rdc/docker-web/container-config/apache2/sites-available/README.md b/rdc/docker-web/container-config/apache2/sites-available/README.md deleted file mode 100644 index f017142..0000000 --- a/rdc/docker-web/container-config/apache2/sites-available/README.md +++ /dev/null @@ -1,2 +0,0 @@ -You can add configuration info to the default virtualhost 000-site.conf by using the site.custom file. -All other .conf files in the sites-enabled directory will be loaded. \ No newline at end of file diff --git a/rdc/docker-web/container-config/apache2/sites-available/site.custom b/rdc/docker-web/container-config/apache2/sites-available/site.custom index 95eaa72..5338952 100644 --- a/rdc/docker-web/container-config/apache2/sites-available/site.custom +++ b/rdc/docker-web/container-config/apache2/sites-available/site.custom @@ -1,3 +1 @@ -# This file is inserted into the 000-site.conf default virtual host. -# If you want to customize the vhost.conf you can customize this file -# and insert it with the overrides. +# This is a placeholder for a conf file inserted into the default vhost diff --git a/rdc/docker-web/container-config/startup-scripts/50-remove_default_vhost.sh b/rdc/docker-web/container-config/startup-scripts/50-remove_default_vhost.sh index b5508d6..0400bc8 100644 --- a/rdc/docker-web/container-config/startup-scripts/50-remove_default_vhost.sh +++ b/rdc/docker-web/container-config/startup-scripts/50-remove_default_vhost.sh @@ -5,4 +5,9 @@ if [[ "${REMOVE_DEFAULT_VHOST}" = true ]]; then rm /etc/apache2/sites-enabled/000-default.conf echo "Removed 000-default site" +else + # unless we are removing the default vhost, lets turn off the other vhost logging + echo "Remove other-vhosts-access-log" + #rm /etc/apache2/conf-enabled/other-vhosts-access-log.conf + a2disconf other-vhosts-access-log fi diff --git a/rdc/redcap-overrides/web/apache2/sites-available/ssl.conf b/rdc/redcap-overrides/web/apache2/sites-available/ssl.conf index 5ccae7f..7a5cf3d 100644 --- a/rdc/redcap-overrides/web/apache2/sites-available/ssl.conf +++ b/rdc/redcap-overrides/web/apache2/sites-available/ssl.conf @@ -4,6 +4,7 @@ ServerAdmin ${SERVER_ADMIN} DocumentRoot ${APACHE_DOCUMENT_ROOT} + LogLevel warn ErrorLog ${APACHE_ERROR_LOG} CustomLog ${APACHE_ACCESS_LOG} combined diff --git a/rdc/redcap-overrides/web/php/80-xdebug.ini b/rdc/redcap-overrides/web/php/80-xdebug.ini index 35c2b49..69238ba 100644 --- a/rdc/redcap-overrides/web/php/80-xdebug.ini +++ b/rdc/redcap-overrides/web/php/80-xdebug.ini @@ -2,14 +2,10 @@ ; https://xdebug.org/docs/upgrade_guide ; These set the 'master' values that are used by default unless overridden by the .env variable ; see: https://stackoverflow.com/questions/19520744/what-is-the-difference-between-local-value-and-master-value +; see https://xdebug.org/docs/all_settings for all settings xdebug.client_port=9003 xdebug.client_host=host.docker.internal xdebug.mode=develop,debug xdebug.start_with_request=trigger - - - -;xdebug.idekey=PHPSTORM -;xdebug.trigger_value=XDEBUG_ECLIPSE -;xdebug.cli_color=1 -;xdebug.max_nesting_level=1000 \ No newline at end of file +xdebug.log=/var/log/redcap/xdebug.log +xdebug.log_level=3