Merge branch 'master' into 3198-writable-fuse
[arvados.git] / docker / sso / Dockerfile
1 # Arvados API server Docker container.
2
3 FROM arvados/passenger
4 MAINTAINER Ward Vandewege <ward@curoverse.com>
5
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
8
9 # Install generated config files
10 ADD generated/seeds.rb /usr/src/sso-provider/db/seeds.rb
11 ADD generated/database.yml /usr/src/sso-provider/config/database.yml
12 ADD generated/application.yml /usr/src/sso-provider/config/application.yml
13 ADD generated/apache2_vhost /etc/apache2/sites-available/sso-provider
14 ADD generated/apache2_vhost /etc/apache2/sites-available/sso-provider
15
16 # Configure Apache and Passenger.
17 RUN a2dissite default && \
18     a2ensite sso-provider && \
19     a2enmod rewrite && \
20     a2enmod ssl && \
21     cd /usr/src/sso-provider && \
22     cp config/environments/production.rb.example config/environments/production.rb && \
23     RAILS_ENV=production /usr/local/rvm/bin/rvm-exec default bundle exec rake db:setup && \
24     /usr/local/rvm/bin/rvm-exec default bundle exec rake assets:precompile && \
25     chown www-data:www-data log config.ru -R && \
26     chown www-data:www-data db db/production.sqlite3 && \
27     /bin/mkdir /var/run/apache2
28
29 ADD apache2_foreground.sh /etc/apache2/foreground.sh
30
31 # Start the supervisor.
32 CMD ["/etc/apache2/foreground.sh"]