-
Notifications
You must be signed in to change notification settings - Fork 0
Adding Plugins & Themes
The functionality of redmine can be extended using plugins developed by the community. You can find a list of available plugins in the Redmine Plugins Directory. You can also search for plugins on github.
Please check the plugin compatibility with the redmine version before installing a plugin.
Plugins should be installed in the plugins
directory at the data store. If you are following the readme verbatim, on the host this location would be /opt/redmine/data/plugins
.
mkdir -p /opt/redmine/data/plugins
To install a plugin, simply copy the plugin assets to the plugins
directory. For example, to install the recurring tasks plugin:
cd /opt/redmine/data/plugins
git clone https://github.com/nutso/redmine-plugin-recurring-tasks.git
For most plugins this is all you need to do. With the plugin installed you can start the docker image normally. The image will detect that a plugin has been added (or removed) and automatically install the required gems and perform the plugin migrations and will be ready for use.
If the gem installation fails after adding a new plugin, please retry after removing the /opt/redmine/data/tmp
directory
Some plugins however, require you to perform additional configurations to function correctly. You can add these steps in a init
script at the /opt/redmine/data/plugins
directory that will executed everytime the image is started.
For example, the recurring tasks plugin requires that you create a cron job to periodically execute a rake task. To achieve this, create the /opt/redmine/data/plugins/init
file with the following content:
## Recurring Tasks Configuration
# get the list existing cron jobs for the redmine user
set +e
crontab -u redmine -l 2>/dev/null >/tmp/cron.redmine
set -e
# add new job for recurring tasks
echo '* */4 * * * cd /home/redmine/redmine && bundle exec rake redmine:recur_tasks RAILS_ENV=production >> log/cron_rake.log 2>&1' >>/tmp/cron.redmine
# install the new jobs
crontab -u redmine /tmp/cron.redmine 2>/dev/null
# remove the temporary file
rm -rf /tmp/cron.redmine
## End of Recurring Tasks Configuration
Now whenever the image is started the above init script will be executed and the required cron job will be installed.
Previously this image packaged a couple of plugins by default. Existing users would notice that those plugins are no longer available. If you want them back, follow these instructions:
cd /opt/redmine/data/plugins
wget http://goo.gl/iJcvCP -O - | sh
Please Note: this plugin install script is not maintained and you would need to fix it if required (especially broken links)
To uninstall plugins you need to first tell redmine about the plugin you need to uninstall. This is done via a rake task:
docker run --name=redmine -it --rm \
-v /opt/redmine/data:/home/redmine/data \
dockerimages/redmine:2.5.2-2 \
app:rake redmine:plugins:migrate NAME=plugin_name VERSION=0
Once the rake task has been executed, the plugin should be removed from the /opt/redmine/data/plugins/
directory.
rm -rf /opt/redmine/data/plugins/plugin_name
Any configuration that you may have added in the /opt/redmine/data/plugins/init
script for the plugin should also be removed.
For example, to remove the recurring tasks plugin:
docker run --name=redmine -it --rm \
-v /opt/redmine/data:/home/redmine/data \
dockerimages/redmine:2.5.2-2 \
app:rake redmine:plugins:migrate NAME=recurring_tasks VERSION=0
rm -rf /opt/redmine/data/plugins/recurring_tasks
Now when the image is started the plugin will be gone.
Just like plugins, redmine allows users to install additional themes. You can find a list of available plugins in the Redmine Themes Directory
Themes should be installed in the themes
directory at the data store. If you are following the readme verbatim, on the host this location would be /opt/redmine/data/themes
.
mkdir -p /opt/redmine/data/themes
To install a theme, simply copy the theme assets to the themes
directory. For example, to install the gitmike theme:
cd /opt/redmine/data/themes
git clone https://github.com/makotokw/redmine-theme-gitmike.git gitmike
With the theme installed you can start the docker image normally and the newly installed theme should be available for use.
Previously this image packaged a couple of themes by default. Existing users would notice that those themes are no longer available. If you want them back, follow these instructions:
cd /opt/redmine/data/themes
wget http://goo.gl/deKDpp -O - | sh
Please Note: this theme install script is not maintained and you would need to fix it if required (especially broken links)
To uninstall plugins you simply need to remove the theme from the /opt/redmine/data/themes/
directory and restart the image.
rm -rf /opt/redmine/data/themes/theme_name
For example, to remove the gitmike theme:
rm -rf /opt/redmine/data/themes/gitmike
Now when the image is started the theme will be not be available anymore.