2014-04-11 17:32:45 +00:00
|
|
|
FROM phusion/baseimage:0.9.9
|
2014-04-07 05:20:09 +00:00
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
2014-04-11 17:32:45 +00:00
|
|
|
ENV HOME /root
|
|
|
|
|
2014-04-15 21:14:19 +00:00
|
|
|
# Needed for this fix: http://stackoverflow.com/a/21715730
|
2014-04-07 05:20:09 +00:00
|
|
|
RUN apt-get update
|
2014-04-15 21:14:19 +00:00
|
|
|
RUN apt-get install -y software-properties-common python-software-properties
|
|
|
|
RUN add-apt-repository ppa:chris-lea/node.js
|
|
|
|
|
|
|
|
# Install the dependencies.
|
2014-04-07 05:20:09 +00:00
|
|
|
RUN apt-get update
|
2014-04-17 16:29:23 +00:00
|
|
|
|
|
|
|
# New ubuntu packages should be added as their own apt-get install lines below the existing install commands
|
2014-04-21 22:53:03 +00:00
|
|
|
RUN apt-get install -y git python-virtualenv python-dev libjpeg8 libjpeg62-dev libevent-dev gdebi-core g++ libmagic1 libssl1.0.0
|
|
|
|
|
|
|
|
# PhantomJS
|
|
|
|
RUN apt-get install -y libfreetype6 libfreetype6-dev fontconfig
|
|
|
|
ADD https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 phantomjs.tar.bz2
|
|
|
|
RUN tar xjf phantomjs.tar.bz2 && ln -s `pwd`/phantomjs*/bin/phantomjs /usr/bin/phantomjs
|
|
|
|
|
|
|
|
# Grunt
|
|
|
|
RUN apt-get install -y nodejs
|
2014-04-15 21:14:19 +00:00
|
|
|
RUN npm install -g grunt-cli
|
2014-04-07 05:20:09 +00:00
|
|
|
|
|
|
|
ADD binary_dependencies binary_dependencies
|
|
|
|
RUN gdebi --n binary_dependencies/*.deb
|
|
|
|
|
2014-04-11 17:32:45 +00:00
|
|
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
ADD requirements.txt requirements.txt
|
2014-04-07 05:20:09 +00:00
|
|
|
RUN virtualenv --distribute venv
|
|
|
|
RUN venv/bin/pip install -r requirements.txt
|
|
|
|
|
|
|
|
ADD auth auth
|
|
|
|
ADD buildstatus buildstatus
|
|
|
|
ADD conf conf
|
|
|
|
ADD data data
|
|
|
|
ADD endpoints endpoints
|
|
|
|
ADD features features
|
2014-04-15 21:14:19 +00:00
|
|
|
ADD grunt grunt
|
2014-04-07 05:20:09 +00:00
|
|
|
ADD screenshots screenshots
|
|
|
|
ADD static static
|
|
|
|
ADD storage storage
|
|
|
|
ADD templates templates
|
|
|
|
ADD util util
|
|
|
|
ADD workers workers
|
|
|
|
|
|
|
|
ADD app.py app.py
|
|
|
|
ADD application.py application.py
|
|
|
|
ADD config.py config.py
|
2014-04-14 15:40:17 +00:00
|
|
|
ADD initdb.py initdb.py
|
2014-04-11 17:32:45 +00:00
|
|
|
|
|
|
|
ADD conf/init/mklogsdir.sh /etc/my_init.d/
|
|
|
|
ADD conf/init/gunicorn.sh /etc/service/gunicorn/run
|
|
|
|
ADD conf/init/nginx.sh /etc/service/nginx/run
|
|
|
|
ADD conf/init/diffsworker.sh /etc/service/diffsworker/run
|
|
|
|
ADD conf/init/webhookworker.sh /etc/service/webhookworker/run
|
2014-04-07 05:20:09 +00:00
|
|
|
|
2014-04-15 21:14:19 +00:00
|
|
|
RUN cd grunt && npm install
|
|
|
|
RUN cd grunt && grunt
|
|
|
|
|
2014-04-21 23:46:00 +00:00
|
|
|
# Add the tests last because they're prone to accidental changes, then run them
|
|
|
|
ADD test test
|
2014-04-14 15:40:17 +00:00
|
|
|
RUN TEST=true venv/bin/python -m unittest discover
|
|
|
|
|
2014-04-17 16:29:23 +00:00
|
|
|
RUN rm -rf /conf/stack
|
2014-04-07 20:59:22 +00:00
|
|
|
VOLUME ["/conf/stack", "/mnt/logs"]
|
2014-04-07 05:20:09 +00:00
|
|
|
|
2014-04-07 20:59:22 +00:00
|
|
|
EXPOSE 443 80
|
2014-04-07 05:20:09 +00:00
|
|
|
|
2014-04-11 17:32:45 +00:00
|
|
|
CMD ["/sbin/my_init"]
|