Skip to content

Commit

Permalink
Set the default user to ckan in images
Browse files Browse the repository at this point in the history
Added back script for cron job
  • Loading branch information
MarkCalvert committed Sep 2, 2024
1 parent 93172df commit b8fd44a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
5 changes: 4 additions & 1 deletion ckan/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ ENV CKAN_INI=${APP_DIR}/config/dbca.ini
# Set the permissions to the ckan user
RUN chown -R ckan:ckan $APP_DIR && \
chown -R ckan:ckan /usr/lib/python3.10/site-packages/ && \
chown -R ckan:ckan /usr/bin/
chown -R ckan:ckan /usr/bin/

# Set the default user to ckan
USER ckan
5 changes: 4 additions & 1 deletion ckan/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,7 @@ ENV CKAN_INI=${APP_DIR}/config/dbca.ini
# Set the permissions to the ckan user
RUN chown -R ckan:ckan $APP_DIR && \
chown -R ckan:ckan /usr/lib/python3.10/site-packages/ && \
chown -R ckan:ckan /usr/bin/
chown -R ckan:ckan /usr/bin/

# Set the default user to ckan
USER ckan
10 changes: 9 additions & 1 deletion ckan/Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ RUN ckan config-tool $CKAN_INI "ckan.plugins = ${CKAN__PLUGINS}"
COPY supervisor/ckan_*.conf /etc/supervisord.d
COPY supervisor/supervisord.conf /etc/supervisord.conf

## Cron jobs scripts
COPY setup/dbca_logs_maintenance.sql $APP_DIR

# Set the default user to root temporarily to update file and folder permissions
USER root
# Set the permissions to the ckan user
RUN chown -R ckan:ckan $APP_DIR && \
chown -R ckan:ckan /usr/lib/python3.10/site-packages/ && \
chown -R ckan:ckan /usr/bin/ && \
chown -R ckan:ckan /etc/supervisord.d
chown -R ckan:ckan /etc/supervisord.d && \
chmod -x $APP_DIR/dbca_logs_maintenance.sql

# Set the default user to ckan
USER ckan

0 comments on commit b8fd44a

Please sign in to comment.