diff --git a/redmine/Dockerfile b/redmine/Dockerfile index a035fc4..02a8382 100644 --- a/redmine/Dockerfile +++ b/redmine/Dockerfile @@ -1,10 +1,13 @@ -FROM redmine:4.2.6 +FROM redmine:4.2.8 -WORKDIR /usr/src/redmine +ENV REDMINE_PATH=/usr/src/redmine \ + REDMINE_LOCAL_PATH=/var/local/redmine + +WORKDIR $REDMINE_PATH RUN apt-get update \ && apt-get install -y --no-install-recommends \ - unzip \ + unzip cron curl \ && rm -rf /var/lib/apt/lists/* COPY plugins/ ./plugins @@ -17,4 +20,10 @@ RUN chmod -R 755 ./plugins/* RUN rm ./plugins/*.zip RUN rm ./public/themes/*.zip -CMD ["rails", "server", "-b", "0.0.0.0"] \ No newline at end of file +COPY issue_dynamic_edit_configuration_file.js ./plugins/redmine_issue_dynamic_edit/assets/javascripts/ + +COPY entrypoint.sh update-repos.sh ${REDMINE_LOCAL_PATH}/scripts/ +COPY crontab ${REDMINE_LOCAL_PATH}/ + +ENTRYPOINT ["/var/local/redmine/scripts/entrypoint.sh"] +CMD [] diff --git a/redmine/README.md b/redmine/README.md new file mode 100644 index 0000000..c217e12 --- /dev/null +++ b/redmine/README.md @@ -0,0 +1,18 @@ +# Redmine + +Reference documentation: + +* https://github.com/eaudeweb/redmine.docker + +## Repository + +Clone repository for the first time. +``` +cd $repositoriesDir +git clone --mirror $repositoryUrl +``` + +More info: + +* https://www.redmine.org/projects/redmine/wiki/RedmineRepositories +* https://www.redmine.org/projects/redmine/wiki/HowTo_Easily_integrate_a_(SSH_secured)_GIT_repository_into_redmine diff --git a/redmine/crontab b/redmine/crontab new file mode 100644 index 0000000..5129f06 --- /dev/null +++ b/redmine/crontab @@ -0,0 +1 @@ +*/10 * * * * . /var/local/redmine/scripts/update-repositories.sh diff --git a/redmine/entrypoint.sh b/redmine/entrypoint.sh new file mode 100755 index 0000000..2a7316e --- /dev/null +++ b/redmine/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +/usr/sbin/cron +crontab -u root /var/local/redmine/crontab + +/docker-entrypoint.sh rails server -b 0.0.0.0 diff --git a/redmine/issue_dynamic_edit_configuration_file.js b/redmine/issue_dynamic_edit_configuration_file.js new file mode 100644 index 0000000..556e72a --- /dev/null +++ b/redmine/issue_dynamic_edit_configuration_file.js @@ -0,0 +1,11 @@ +/* + * CONFIGURATION FILE + * More info on https://github.com/Ilogeek/redmine_issue_dynamic_edit + */ + +var _CONF_FORCE_HTTPS = false; +var _CONF_DISPLAY_EDIT_ICON = 'single'; +var _CONF_LISTENER_TYPE_VALUE = 'none'; +var _CONF_LISTENER_TYPE_ICON = 'click'; +var _CONF_LISTENER_TARGET = 'fa-pencil'; +var _CONF_EXCLUDED_FIELD_ID = []; diff --git a/redmine/plugins/redmine_issue_dynamic_edit-0.8.1.zip b/redmine/plugins/redmine_issue_dynamic_edit-0.8.1.zip new file mode 100644 index 0000000..bfd7a68 Binary files /dev/null and b/redmine/plugins/redmine_issue_dynamic_edit-0.8.1.zip differ diff --git a/redmine/plugins/redmine_issue_dynamic_edit.zip b/redmine/plugins/redmine_issue_dynamic_edit.zip deleted file mode 100644 index d004213..0000000 Binary files a/redmine/plugins/redmine_issue_dynamic_edit.zip and /dev/null differ diff --git a/redmine/themes/PurpleMine2-2.13.0.zip b/redmine/themes/PurpleMine2-2.15.0.zip similarity index 85% rename from redmine/themes/PurpleMine2-2.13.0.zip rename to redmine/themes/PurpleMine2-2.15.0.zip index b32bfcd..6cd73e4 100644 Binary files a/redmine/themes/PurpleMine2-2.13.0.zip and b/redmine/themes/PurpleMine2-2.15.0.zip differ diff --git a/redmine/update-repos.sh b/redmine/update-repos.sh new file mode 100755 index 0000000..8c400f2 --- /dev/null +++ b/redmine/update-repos.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +GIT_SYNC_FOLDER="/var/local/redmine/repositories" + +for REPO_DIR in "$GIT_SYNC_FOLDER/"*; do + if [ -d "$REPO_DIR" ] && [[ "$REPO_DIR" =~ ^.+\.git$ ]]; then + echo "Fetching $REPO_DIR" + (cd "$REPO_DIR" && git remote update --prune) >> /dev/null + fi +done