Merge branch 'master' into 1971-show-image-thumbnails
[arvados.git] / docker / workbench / Dockerfile
1 # Arvados Workbench Docker container.
2
3 FROM arvados/passenger
4 MAINTAINER Ward Vandewege <ward@curoverse.com>
5
6 # Update Arvados source
7 RUN /bin/mkdir -p /usr/src/arvados/apps
8 ADD generated/workbench.tar.gz /usr/src/arvados/apps/
9 ADD generated/secret_token.rb /usr/src/arvados/apps/workbench/config/initializers/secret_token.rb
10 ADD generated/production.rb /usr/src/arvados/apps/workbench/config/environments/production.rb
11 ADD passenger.conf /etc/apache2/conf.d/passenger
12
13
14 RUN bundle install --gemfile=/usr/src/arvados/apps/workbench/Gemfile && \
15     touch /usr/src/arvados/apps/workbench/log/production.log && \
16     chmod 666 /usr/src/arvados/apps/workbench/log/production.log && \
17     touch /usr/src/arvados/apps/workbench/db/production.sqlite3 && \
18     bundle install --gemfile=/usr/src/arvados/apps/workbench/Gemfile && \
19     cd /usr/src/arvados/apps/workbench && \
20     rake assets:precompile && \
21     chown -R www-data:www-data /usr/src/arvados/apps/workbench
22
23 # Configure Apache
24 ADD generated/apache2_vhost /etc/apache2/sites-available/workbench
25 RUN \
26   a2dissite default && \
27   a2ensite workbench && \
28   a2enmod rewrite
29
30 ADD apache2_foreground.sh /etc/apache2/foreground.sh
31
32 # Start Apache
33 CMD ["/etc/apache2/foreground.sh"]
34