Container: From npm to apache

This commit is contained in:
aviau 2015-04-20 17:20:36 -04:00
parent b87c73e209
commit 4aaca6addc
4 changed files with 17 additions and 21 deletions

View File

@ -1,3 +1,5 @@
{
"directory": "app/bower_components"
}
"directory": "app/bower_components",
"allow_root": true,
"analytics": true
}

View File

@ -7,9 +7,8 @@ ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN apt-get update
RUN apt-get install -yq apache2 npm nodejs-legacy supervisor ruby
RUN npm install -g grunt-cli
RUN apt-get update && apt-get install -yq git apache2 npm nodejs-legacy supervisor ruby
RUN npm install -g grunt-cli bower
RUN gem install sass
RUN mkdir -p /var/lock/apache2 /var/run/apache2 /var/run/sshd /var/log/supervisor
@ -21,11 +20,11 @@ ADD container/000-default.conf etc/apache2/sites-enabled/000-default.conf
ADD container/ports.conf etc/apache2/ports.conf
ADD /package.json /opt/adagios-frontend/package.json
RUN cd /opt/adagios-frontend/ && npm install
ADD /.bowerrc /opt/adagios-frontend/.bowerrc
ADD /.jshintrc /opt/adagios-frontend/.jshintrc
ADD /Gruntfile.js /opt/adagios-frontend/Gruntfile.js
ADD /bower.json /opt/adagios-frontend/bower.json
RUN cd /opt/adagios-frontend/ && npm install --unsafe-perm
ADD /app /opt/adagios-frontend/app
RUN a2enmod proxy

22
container/000-default.conf Normal file → Executable file
View File

@ -1,16 +1,14 @@
<Directory "/opt/adagios-frontend/app/">
Order allow,deny
Allow from all
Require all granted
</Directory>
<VirtualHost *:8888>
Alias / /opt/adagios-frontend/app/
ProxyPreserveHost On
# Servers to proxy the connection, or;
# List of application servers:
# Usage:
# ProxyPass / http://[IP Addr.]:[port]/
# ProxyPassReverse / http://[IP Addr.]:[port]/
# Example:
ProxyPass / http://localhost:8000/app/
ProxyPassReverse / http://localhost:8000/app/
ProxyPass /surveil http://surveil:8080/
ProxyPassReverse /surveil http://surveil:8080/
ProxyPass /surveil/ http://surveil:8080/
ProxyPassReverse /surveil/ http://surveil:8080/
</VirtualHost>

3
container/supervisord.conf Normal file → Executable file
View File

@ -4,9 +4,6 @@ nodaemon=true
[program:apache2]
command=/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND"
[program:npm]
command=/bin/bash -c "npm start /opt/adagios-frontend"
[program:grunt]
command=/bin/bash -c "cd /opt/adagios-frontend && grunt sass && grunt uglify && grunt"