This commit is contained in:
Juan Ferrer 2022-10-14 19:42:18 +02:00
parent 3cb0a46788
commit 638aee74b6
9 changed files with 59 additions and 4 deletions

View File

@ -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"]
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 []

18
redmine/README.md Normal file
View File

@ -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

1
redmine/crontab Normal file
View File

@ -0,0 +1 @@
*/10 * * * * . /var/local/redmine/scripts/update-repositories.sh

6
redmine/entrypoint.sh Executable file
View File

@ -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

View File

@ -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 = [];

Binary file not shown.

10
redmine/update-repos.sh Executable file
View File

@ -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