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