2014-09-10 18:43:10 +00:00
|
|
|
FROM phusion/baseimage:0.9.13
|
2014-05-16 22:31:24 +00:00
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
ENV HOME /root
|
|
|
|
|
|
|
|
# Install the dependencies.
|
2014-09-10 18:43:10 +00:00
|
|
|
RUN apt-get update # 10SEP2014
|
2014-05-16 22:31:24 +00:00
|
|
|
|
|
|
|
# New ubuntu packages should be added as their own apt-get install lines below the existing install commands
|
2014-08-22 22:06:45 +00:00
|
|
|
RUN apt-get install -y git python-virtualenv python-dev libjpeg8 libjpeg62-dev libevent-dev gdebi-core g++ libmagic1 phantomjs nodejs npm libldap2-dev libsasl2-dev libpq-dev
|
2014-05-16 22:31:24 +00:00
|
|
|
|
2014-07-18 03:17:43 +00:00
|
|
|
# Build the python dependencies
|
|
|
|
ADD requirements.txt requirements.txt
|
|
|
|
RUN virtualenv --distribute venv
|
|
|
|
RUN venv/bin/pip install -r requirements.txt
|
2014-05-22 16:13:41 +00:00
|
|
|
|
2014-07-18 03:17:43 +00:00
|
|
|
# Install the binary dependencies
|
2014-05-16 22:31:24 +00:00
|
|
|
ADD binary_dependencies binary_dependencies
|
|
|
|
RUN gdebi --n binary_dependencies/*.deb
|
|
|
|
|
2014-07-18 03:17:43 +00:00
|
|
|
# Grunt
|
|
|
|
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
|
|
|
RUN npm install -g grunt-cli
|
2014-05-16 22:31:24 +00:00
|
|
|
|
2014-07-18 03:17:43 +00:00
|
|
|
# Add all of the files!
|
|
|
|
ADD . .
|
2014-05-16 22:31:24 +00:00
|
|
|
|
2014-07-18 03:17:43 +00:00
|
|
|
# Run grunt
|
2014-05-22 16:13:41 +00:00
|
|
|
RUN cd grunt && npm install
|
|
|
|
RUN cd grunt && grunt
|
|
|
|
|
2014-05-18 21:19:14 +00:00
|
|
|
ADD conf/init/svlogd_config /svlogd_config
|
2014-08-25 18:23:21 +00:00
|
|
|
ADD conf/init/doupdatelimits.sh /etc/my_init.d/
|
2014-05-18 21:19:14 +00:00
|
|
|
ADD conf/init/preplogsdir.sh /etc/my_init.d/
|
2014-05-22 16:13:41 +00:00
|
|
|
ADD conf/init/runmigration.sh /etc/my_init.d/
|
|
|
|
|
2014-05-18 21:19:14 +00:00
|
|
|
ADD conf/init/gunicorn /etc/service/gunicorn
|
|
|
|
ADD conf/init/nginx /etc/service/nginx
|
|
|
|
ADD conf/init/diffsworker /etc/service/diffsworker
|
2014-07-31 17:30:54 +00:00
|
|
|
ADD conf/init/notificationworker /etc/service/notificationworker
|
2014-09-12 15:57:47 +00:00
|
|
|
ADD conf/init/buildlogsarchiver /etc/service/buildlogsarchiver
|
2014-07-31 17:30:54 +00:00
|
|
|
|
2014-05-22 16:13:41 +00:00
|
|
|
# Download any external libs.
|
2014-07-18 03:17:43 +00:00
|
|
|
RUN mkdir static/fonts static/ldn
|
2014-05-22 16:13:41 +00:00
|
|
|
RUN venv/bin/python -m external_libraries
|
2014-05-16 22:31:24 +00:00
|
|
|
|
2014-07-18 03:17:43 +00:00
|
|
|
# Run the tests
|
2014-05-16 22:31:24 +00:00
|
|
|
RUN TEST=true venv/bin/python -m unittest discover
|
|
|
|
|
2014-09-16 03:44:35 +00:00
|
|
|
VOLUME ["/conf/stack", "/var/log", "/datastorage", "/tmp"]
|
2014-05-16 22:31:24 +00:00
|
|
|
|
|
|
|
EXPOSE 443 80
|
|
|
|
|
|
|
|
CMD ["/sbin/my_init"]
|