1 # Arvados Workbench Docker container.
4 MAINTAINER Ward Vandewege <ward@clinicalfuture.com>
6 ENV DEBIAN_FRONTEND noninteractive
10 # Update Arvados source
13 apt-get install -q -y apt-utils git curl procps apache2-mpm-worker locales \
14 libcurl4-openssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev ;\
15 curl -L https://get.rvm.io | bash -s stable --ruby=${RUBY_VERSION_NUM} ;\
16 /bin/sed -ri 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen ;\
17 /usr/sbin/locale-gen ;\
18 cd /usr/src/arvados; git pull ;\
19 touch /usr/src/arvados/apps/workbench/log/production.log ;\
20 chmod 666 /usr/src/arvados/apps/workbench/log/production.log ;\
21 touch /usr/src/arvados/apps/workbench/db/production.sqlite3 ;\
22 bundle install --gemfile=/usr/src/arvados/apps/workbench/Gemfile ;\
23 cd /usr/src/arvados/apps/workbench; rake assets:precompile ;\
24 passenger-install-apache2-module --auto ;\
28 ADD apache2_vhost /etc/apache2/sites-available/workbench
33 # Set up the production environment
34 ADD secret_token.rb /usr/src/arvados/apps/workbench/config/initializers/secret_token.rb
35 ADD production.rb /usr/src/arvados/apps/workbench/config/environments/production.rb
36 ADD passenger.conf /etc/apache2/conf.d/passenger
38 # Finally, start Apache
39 ENV APACHE_RUN_USER www-data
40 ENV APACHE_RUN_GROUP www-data
41 ENV APACHE_PID_FILE /var/run/apache2.pid
42 ENV APACHE_RUN_DIR /var/run/apache2
43 ENV APACHE_LOCK_DIR /var/lock/apache2
44 ENV APACHE_LOG_DIR /var/log/apache2
47 CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]