1 # Arvados API server Docker container.
4 MAINTAINER Ward Vandewege <ward@curoverse.com>
6 RUN git clone git://github.com/curoverse/sso-devise-omniauth-provider.git /usr/src/sso-provider && \
7 /usr/local/rvm/bin/rvm-exec default bundle install --gemfile=/usr/src/sso-provider/Gemfile
9 # Install generated config files
10 ADD generated/secret_token.rb /usr/src/sso-provider/config/initializers/secret_token.rb
11 ADD generated/seeds.rb /usr/src/sso-provider/db/seeds.rb
12 ADD generated/apache2_vhost /etc/apache2/sites-available/sso-provider
13 ADD generated/apache2_vhost /etc/apache2/sites-available/sso-provider
15 # Configure Apache and Passenger.
16 RUN a2dissite default && \
17 a2ensite sso-provider && \
20 cd /usr/src/sso-provider && \
21 RAILS_ENV=production /usr/local/rvm/bin/rvm-exec default bundle exec rake db:setup && \
22 /usr/local/rvm/bin/rvm-exec default bundle exec rake assets:precompile && \
23 chown www-data:www-data tmp_omniauth log config.ru -R && \
24 chown www-data:www-data db db/production.sqlite3 && \
25 /bin/mkdir /var/run/apache2
27 ADD apache2_foreground.sh /etc/apache2/foreground.sh
29 # Start the supervisor.
30 CMD ["/etc/apache2/foreground.sh"]