#!/bin/bash -xe

echo "Waiting for plugins to be ready..."
while ! [ -f "/usr/src/redmine/files/plugins-are-ready" ]; do
	sleep 1
done

sed -i 's,http://deb.debian.org/debian,http://cloudfront.debian.net/debian,' /etc/apt/sources.list
while ! apt-get update; do sleep 5; done
apt-get install -qy make gcc libcurl3 libcurl3-gnutls libcurl4-openssl-dev

for dir in /usr/src/redmine/plugins/*; do
        [ -d "$dir" ] || continue
        (cd "$dir"; bundle install)
done

chown redmine:redmine /home/redmine -R

(cd /usr/src/redmine; bundle install)

/docker-entrypoint.sh "$@" &

sleep 20 # wait for entrypoint to setup the database
# run plugin migrations
gosu redmine rake redmine:plugins RAILS_ENV=production

wait # wait for rails to finish


#!/bin/bash -xe

echo "Waiting for plugins to be ready..."
while ! [ -f "/usr/src/redmine/files/plugins-are-ready" ]; do
	sleep 1
done

sed -i 's,http://deb.debian.org/debian,http://cloudfront.debian.net/debian,' /etc/apt/sources.list
while ! apt-get update; do sleep 5; done
apt-get install -qy make gcc libcurl3 libcurl3-gnutls libcurl4-openssl-dev
gem install bundler

for dir in /usr/src/redmine/plugins/*; do
        [ -d "$dir" ] || continue
        (cd "$dir"; bundle install)
done

chown redmine:redmine /home/redmine -R

(cd /usr/src/redmine; bundle install)

/docker-entrypoint.sh "$@" &

sleep 20 # wait for entrypoint to setup the database
# run plugin migrations
gosu redmine rake redmine:plugins RAILS_ENV=production

wait # wait for rails to finish


Update bundler to latest supported
Update bundler to latest supported

Redmine and/or some plugins now require bundler 2, which is not what you get by default with the official Redmine image