Asset pre-generation fails with db yml. Move it back to the Dockerfile.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-03-23 17:29:54 +01:00
parent fd3b5645c0
commit ae31438e9e
2 changed files with 9 additions and 3 deletions

View File

@@ -21,6 +21,15 @@ RUN apt-get update \
&& rm -f /etc/cron.d/* \
# Install plugin dependencies \
&& bundle check || bundle install \
# For hourglass plugin \
# fill up "database.yml" with bogus entries so the redmine Gemfile will pre-install all database adapter dependencies \
echo '# the following entries only exist to force `bundle install` to pre-install all database adapter dependencies -- they can be safely removed/ignored' > ./config/database.yml && \
for adapter in mysql2 postgresql sqlserver sqlite3; do \
echo "$adapter:" >> ./config/database.yml; \
echo " adapter: $adapter" >> ./config/database.yml; \
done; \
&& bundle exec rake redmine:plugins:assets RAILS_ENV=production \
&& rm ./config/database.yml \
&& chmod +x /pre-entrypoint.sh \
# setting ENTRYPOINT destroys CMD so replace the entrypoint script and call it later \
# (see bottom note in https://docs.docker.com/engine/reference/builder/#entrypoint) \

View File

@@ -8,9 +8,6 @@ crontab /etc/cron.d/redmine
service cron start
# For hourglass plugin
bundle exec rake redmine:plugins:assets RAILS_ENV=production
set -- /orig-entrypoint.sh "$@"
echo Executing original Redmine "$@"
exec "$@"