[ARVADOS] created: 156f4973068190733d361b2ac80a051fce106da8

git at public.curoverse.com git at public.curoverse.com
Wed Apr 1 09:51:56 EDT 2015


        at  156f4973068190733d361b2ac80a051fce106da8 (commit)


commit 156f4973068190733d361b2ac80a051fce106da8
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Apr 1 09:51:51 2015 -0400

    4752: Use passenger standalone for API server instead of passenger apache module and set ARVADOS_WEBSOCKETS=1

diff --git a/docker/api/Dockerfile b/docker/api/Dockerfile
index 591338c..5ba90c5 100644
--- a/docker/api/Dockerfile
+++ b/docker/api/Dockerfile
@@ -6,7 +6,7 @@ MAINTAINER Ward Vandewege <ward at curoverse.com>
 # Install postgres and apache.
 RUN apt-get update -qq
 RUN apt-get install -qqy \
-    procps postgresql postgresql-server-dev-9.1 apache2 slurm-llnl munge \
+    procps postgresql postgresql-server-dev-9.1 slurm-llnl munge \
     supervisor sudo libwww-perl libio-socket-ssl-perl libcrypt-ssleay-perl \
     libjson-perl cron openssh-server
 
@@ -25,7 +25,6 @@ ADD generated/database.yml /usr/src/arvados/services/api/config/database.yml
 ADD generated/omniauth.rb /usr/src/arvados/services/api/config/initializers/omniauth.rb
 RUN /bin/cp /usr/src/arvados/services/api/config/environments/production.rb.example /usr/src/arvados/services/api/config/environments/production.rb
 ADD generated/application.yml /usr/src/arvados/services/api/config/application.yml
-ADD generated/apache2_vhost /etc/apache2/sites-available/arvados
 
 # Configure Rails databases.
 ENV RAILS_ENV production
@@ -45,13 +44,6 @@ RUN /usr/local/rvm/bin/rvm-exec default bundle install --gemfile=/usr/src/arvado
     mkdir -p tmp && \
     chown www-data:www-data tmp -R
 
-# Configure Apache and Passenger.
-RUN a2dissite default && \
-    a2ensite arvados && \
-    a2enmod rewrite && \
-    a2enmod ssl && \
-    /bin/mkdir /var/run/apache2
-
 # Install a token for root
 RUN mkdir -p /root/.config/arvados; echo "ARVADOS_API_HOST=api" >> /root/.config/arvados/settings.conf && echo "ARVADOS_API_HOST_INSECURE=yes" >> /root/.config/arvados/settings.conf && echo "ARVADOS_API_TOKEN=$(cat /tmp/superuser_token)" >> /root/.config/arvados/settings.conf && chmod 600 /root/.config/arvados/settings.conf
 
@@ -76,7 +68,7 @@ ADD generated/setup.sh /usr/local/bin/setup.sh
 ADD generated/setup-gitolite.sh /usr/local/bin/setup-gitolite.sh
 ADD crunch-dispatch-run.sh /usr/local/bin/crunch-dispatch-run.sh
 ADD munge.sh /usr/local/bin/munge.sh
-ADD apache2_foreground.sh /etc/apache2/foreground.sh
+ADD passenger.sh /usr/local/bin/passenger.sh
 
 # Start the supervisor.
 CMD ["/usr/bin/supervisord", "-n"]
diff --git a/docker/api/passenger.sh b/docker/api/passenger.sh
new file mode 100755
index 0000000..a62d9d5
--- /dev/null
+++ b/docker/api/passenger.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+cd /usr/src/arvados/services/api
+export ARVADOS_WEBSOCKETS=1
+export RAILS_ENV=production
+/usr/local/rvm/bin/rvm-exec default bundle exec rake db:migrate
+exec /usr/local/rvm/bin/rvm-exec default bundle exec passenger start -p443 --ssl --ssl-certificate=/etc/ssl/certs/ssl-cert-snakeoil.pem --ssl-certificate-key=/etc/ssl/private/ssl-cert-snakeoil.key
diff --git a/docker/api/supervisor.conf b/docker/api/supervisor.conf
index c5dd1e9..b24e552 100644
--- a/docker/api/supervisor.conf
+++ b/docker/api/supervisor.conf
@@ -8,9 +8,8 @@ user=postgres
 command=/usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf
 autorestart=true
 
-[program:apache2]
-command=/etc/apache2/foreground.sh
-stopsignal=6
+[program:passenger]
+command=/usr/local/bin/passenger.sh
 autorestart=true
 
 [program:munge]

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list