Skip to content

Commit

Permalink
Set gem versions; write session_store.rb; #33
Browse files Browse the repository at this point in the history
  • Loading branch information
robertauer committed Jan 28, 2020
1 parent bcab576 commit 053cc92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ RUN set -eux -o pipefail \
&& cd .. \
&& rm -rf rubycas-client \
# install redmine required gems
&& echo 'gem "activerecord-session_store"' >> ${WORKDIR}/Gemfile \
# install activerecord-session_store to be able to invalidate sessions after cas logout
&& echo 'gem "activerecord-session_store", "1.1.3"' >> ${WORKDIR}/Gemfile \
# json gem missing in default installation?
&& echo 'gem "json"' >> ${WORKDIR}/Gemfile \
&& echo 'gem "json", "2.3.0"' >> ${WORKDIR}/Gemfile \
# override environment to run redmine with a context path "/redmine"
&& mv ${WORKDIR}/config/environment.ces.rb ${WORKDIR}/config/environment.rb \
# install core plugins
Expand All @@ -108,8 +109,6 @@ RUN set -eux -o pipefail \
&& cd ${WORKDIR} \
&& bundle install --without development test \
&& gem install puma -v 4.3.1 \
# install activerecord-session_store to be able to invalidate sessions after cas logout
&& gem install activerecord-session_store -v 1.1.3 \
# cleanup
&& gem cleanup all \
&& rm -rf /root/* /tmp/* $(gem env gemdir)/cache \
Expand Down
4 changes: 4 additions & 0 deletions resources/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ else
echo "Executing session migration..."
exec_rake db:migrate

# Set session store
echo "Writing session_store.rb..."
echo 'Rails.application.config.session_store :active_record_store, :key => '\''_sessions'\'' ' > "${WORKDIR}"/config/initializers/session_store.rb

# insert default configuration data into database
echo "Inserting default configuration data into database..."
exec_rake redmine:load_default_data
Expand Down

0 comments on commit 053cc92

Please sign in to comment.