Skip to content

Commit

Permalink
Updating cron, logging, and base docker image setup
Browse files Browse the repository at this point in the history
  • Loading branch information
123andy committed Oct 28, 2024
1 parent 2abf845 commit 83f8e4c
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 32 deletions.
3 changes: 2 additions & 1 deletion rdc/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion rdc/docker-cron/crontabs
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions rdc/docker-cron/logrotate/all_rdc_logs
Original file line number Diff line number Diff line change
@@ -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
}
8 changes: 0 additions & 8 deletions rdc/docker-cron/logrotate/php_errors

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions rdc/redcap-overrides/web/apache2/sites-available/ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
ServerAdmin ${SERVER_ADMIN}
DocumentRoot ${APACHE_DOCUMENT_ROOT}

LogLevel warn
ErrorLog ${APACHE_ERROR_LOG}
CustomLog ${APACHE_ACCESS_LOG} combined

Expand Down
10 changes: 3 additions & 7 deletions rdc/redcap-overrides/web/php/80-xdebug.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
xdebug.log=/var/log/redcap/xdebug.log
xdebug.log_level=3

0 comments on commit 83f8e4c

Please sign in to comment.