Skip to content
Snippets Groups Projects
Commit f2fd8ed5 authored by Iain Bryson's avatar Iain Bryson
Browse files
parent eae8e36d
Branches fedbora27-base
No related tags found
No related merge requests found
FROM dtucompute/enote-base-centos:v2018 FROM dtucompute/enote-base-fedora27:v2018
ARG DEPENDENCY_HASH=1 ARG DEPENDENCY_HASH=1
ARG TZ=Europe/Copenhagen
EXPOSE 3000 EXPOSE 3000
...@@ -17,12 +18,17 @@ LABEL version="2018" ...@@ -17,12 +18,17 @@ LABEL version="2018"
LABEL description="This Dockerfile builds the container \ LABEL description="This Dockerfile builds the container \
to house the DTU course website." to house the DTU course website."
# Set timezone
RUN sudo cp /usr/share/zoneinfo/$TZ /etc/localtime
RUN sudo bash -l -c 'echo "${TZ}" > /etc/timezone'
# Install the necessary gems # Install the necessary gems
COPY Gemfile $APP_ROOT/Gemfile COPY Gemfile $APP_ROOT/Gemfile
#COPY dtu-core/ /dtu-core #COPY dtu-core/ /dtu-core
RUN /bin/bash -l -c "env" RUN bundle config github.https true
RUN /bin/bash -l -c "bundle config github.https true" RUN bundle install
RUN /bin/bash -l -c "bundle install" RUN bundle config path
RUN bundle exec rake --version
# install client-side components # install client-side components
COPY package.json $APP_ROOT/package.json COPY package.json $APP_ROOT/package.json
...@@ -55,9 +61,11 @@ RUN mkdir -p $APP_ROOT/tmp ...@@ -55,9 +61,11 @@ RUN mkdir -p $APP_ROOT/tmp
RUN mkdir -p $APP_ROOT/log RUN mkdir -p $APP_ROOT/log
# generate cookie key # generate cookie key
RUN /bin/bash -l -c "PRECOMPILE=1 bundle exec rake secret > ~/secret-key-base.txt" RUN gem install rake
RUN PRECOMPILE=1 bundle exec rake secret
RUN PRECOMPILE=1 bundle exec rake secret > ~/secret-key-base.txt
RUN /bin/bash -l -c "RAILS_ENV=production PRECOMPILE=1 bundle exec rake assets:clobber" RUN RAILS_ENV=production PRECOMPILE=1 bundle exec rake assets:clobber
# Copy bower scripts to public # Copy bower scripts to public
# This bypasses the rails pipeline to ensure that the assets are available # This bypasses the rails pipeline to ensure that the assets are available
...@@ -70,10 +78,10 @@ RUN cp -R pdfjs/build/generic/web/* public/assets/pdfjs-viewer/ ...@@ -70,10 +78,10 @@ RUN cp -R pdfjs/build/generic/web/* public/assets/pdfjs-viewer/
RUN cp -R pdfjs/build/generic/web public/assets/pdfjs-viewer/ RUN cp -R pdfjs/build/generic/web public/assets/pdfjs-viewer/
RUN cp -R pdfjs/build/generic/build public/assets/pdfjs-viewer/ RUN cp -R pdfjs/build/generic/build public/assets/pdfjs-viewer/
RUN /bin/bash -l -c "RAILS_ENV=production PRECOMPILE=1 bundle exec rake assets:precompile" RUN RAILS_ENV=production PRECOMPILE=1 bundle exec rake assets:precompile
RUN /bin/bash -l -c "RAILS_ENV=test bundle install" RUN RAILS_ENV=test bundle install
RUN /bin/bash -l -c "COURSE_ENV=00000 RAILS_ENV=test PRECOMPILE=1 bundle exec rspec spec" RUN COURSE_ENV=00000 RAILS_ENV=test PRECOMPILE=1 bundle exec rspec spec
CMD ["/bin/bash", "-l", "-c", "./run-server.sh 2>&1 | tee $APP_ROOT/log/run-server.log"] CMD ["/bin/bash", "-l", "-c", "./run-server.sh 2>&1 | tee $APP_ROOT/log/run-server.log"]
...@@ -52,11 +52,11 @@ gem 'activemodel', '~> 4.2.5' ...@@ -52,11 +52,11 @@ gem 'activemodel', '~> 4.2.5'
gem 'dtu-core', :git => 'https://github.com/dtu-compute/dtu-enote-core.git', :branch => 'devel'#, :tag => '0.9' gem 'dtu-core', :git => 'https://github.com/dtu-compute/dtu-enote-core.git', :branch => 'devel'#, :tag => '0.9'
#gem 'dtu-core', :path => '../dtu-core' #gem 'dtu-core', :path => '../dtu-core'
gem 'awesome_print', '~> 1.6', '>= 1.6.1' gem 'awesome_print', '~> 1.6', '>= 1.6.1'
# Web Stack # Web Stack
gem 'thin' gem 'thin', '~> 1.7.2'
gem 'foreman', '~> 0.84.0'
# To render podcast pages in rake # To render podcast pages in rake
gem 'backport_new_renderer' gem 'backport_new_renderer'
...@@ -78,7 +78,7 @@ end ...@@ -78,7 +78,7 @@ end
gem 'rubycas-client', '~> 2.3.8', :git => 'https://github.com/rubycas/rubycas-client' gem 'rubycas-client', '~> 2.3.8', :git => 'https://github.com/rubycas/rubycas-client'
gem 'nokogiri', '~> 1.6' gem 'nokogiri', '~> 1.8.1'
# redis # redis
gem 'redis', '~> 3.2' gem 'redis', '~> 3.2'
......
...@@ -7,8 +7,6 @@ timestamp() ...@@ -7,8 +7,6 @@ timestamp()
echo RUNNING WEBSITE SERVER AS `whoami` echo RUNNING WEBSITE SERVER AS `whoami`
source ~/.bashrc
ruby -v | grep "2\.4\.3" ruby -v | grep "2\.4\.3"
rc=$?; if [[ $rc != 0 ]]; then rc=$?; if [[ $rc != 0 ]]; then
echo "Wrong version of Ruby installed!" echo "Wrong version of Ruby installed!"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment