Skip to content

Commit

Permalink
Removed logrotate and consolidated logs into one ckan.log
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCalvert committed Feb 23, 2024
1 parent 4a5c626 commit fc203b7
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 23 deletions.
5 changes: 0 additions & 5 deletions ckan/Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ FROM ${CKAN_IMAGE}
ENV CKAN__PLUGINS="dbca activity datastore xloader scheming_datasets qa archiver report envvars"
RUN ckan config-tool $CKAN_INI "ckan.plugins = ${CKAN__PLUGINS}"

# Install logrotate
RUN apk add logrotate
# Create logrotate config file for app logs
COPY setup/dbca_ckan_rotate_logs /etc/logrotate.d/dbca_ckan_rotate_logs

## Supervisor config
COPY supervisor/*.conf /etc/supervisord.d

Expand Down
2 changes: 0 additions & 2 deletions ckan/docker-entrypoint.d/02_setup_dbca.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
## Create logs folder/files and set permissions
mkdir -p $APP_DIR/logs
touch $APP_DIR/logs/ckan.log
touch $APP_DIR/logs/ckan-worker.log
touch $APP_DIR/logs/ckan-crons-jobs.log
chown -R ckan:ckan $APP_DIR/logs

## Create archive folder and set permissions
Expand Down
2 changes: 0 additions & 2 deletions ckan/setup/dbca_ckan_cron_jobs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Crontab for CKAN cron jobs
# Midnight task to rotate CKAN app logs every day
0 0 * * * /usr/sbin/logrotate -s /srv/app/logs/logrotate.status /etc/logrotate.d/dbca_ckan_rotate_logs
# Example cron job runs the harvester run command every 15 mins
#*/15 * * * * /usr/bin/ckan -c /srv/app/config/dbca.ini harvester run
# 8am task to schedule embargo datasets to public visibility
Expand Down
10 changes: 0 additions & 10 deletions ckan/setup/dbca_ckan_rotate_logs

This file was deleted.

2 changes: 1 addition & 1 deletion ckan/supervisor/ckan_cron_jobs.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ process_name=%(program_name)s-%(process_num)02d


; Log files.
stderr_logfile=/srv/app/logs/ckan-crons-jobs.log
stderr_logfile=/srv/app/logs/ckan.log


; Make sure that the worker is started on system start and automatically
Expand Down
2 changes: 1 addition & 1 deletion ckan/supervisor/ckan_worker_bulk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ process_name=%(program_name)s-%(process_num)02d


; Log files.
stderr_logfile=/srv/app/logs/ckan-worker.log
stderr_logfile=/srv/app/logs/ckan.log


; Make sure that the worker is started on system start and automatically
Expand Down
2 changes: 1 addition & 1 deletion ckan/supervisor/ckan_worker_default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ process_name=%(program_name)s-%(process_num)02d


; Log files.
stderr_logfile=/srv/app/logs/ckan-worker.log
stderr_logfile=/srv/app/logs/ckan.log


; Make sure that the worker is started on system start and automatically
Expand Down
2 changes: 1 addition & 1 deletion ckan/supervisor/ckan_worker_priority.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ process_name=%(program_name)s-%(process_num)02d


; Log files.
stderr_logfile=/srv/app/logs/ckan-worker.log
stderr_logfile=/srv/app/logs/ckan.log


; Make sure that the worker is started on system start and automatically
Expand Down

0 comments on commit fc203b7

Please sign in to comment.