53 lines
No EOL
1.4 KiB
Text
53 lines
No EOL
1.4 KiB
Text
FROM phusion/baseimage:0.9.11
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
ENV HOME /root
|
|
WORKDIR /
|
|
|
|
# Install the dependencies.
|
|
RUN apt-get update # 15JUL2014
|
|
|
|
# New ubuntu packages should be added as their own apt-get install lines below the existing install commands
|
|
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
|
|
|
|
# Build the python dependencies
|
|
ADD requirements.txt requirements.txt
|
|
RUN virtualenv --distribute venv
|
|
RUN venv/bin/pip install -r requirements.txt
|
|
|
|
# Install the binary dependencies
|
|
ADD binary_dependencies binary_dependencies
|
|
RUN gdebi --n binary_dependencies/*.deb
|
|
|
|
# Grunt
|
|
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
|
RUN npm install -g grunt-cli
|
|
|
|
# Add all of the files!
|
|
ADD . .
|
|
|
|
# Run grunt
|
|
RUN cd grunt && npm install
|
|
RUN cd grunt && grunt
|
|
|
|
ADD conf/init/svlogd_config /svlogd_config
|
|
ADD conf/init/preplogsdir.sh /etc/my_init.d/
|
|
ADD conf/init/runmigration.sh /etc/my_init.d/
|
|
|
|
ADD conf/init/gunicorn /etc/service/gunicorn
|
|
ADD conf/init/nginx /etc/service/nginx
|
|
ADD conf/init/diffsworker /etc/service/diffsworker
|
|
ADD conf/init/webhookworker /etc/service/webhookworker
|
|
|
|
# Download any external libs.
|
|
RUN mkdir static/fonts static/ldn
|
|
RUN venv/bin/python -m external_libraries
|
|
|
|
# Run the tests
|
|
RUN TEST=true venv/bin/python -m unittest discover
|
|
|
|
VOLUME ["/conf/stack", "/var/log", "/datastorage"]
|
|
|
|
EXPOSE 443 80
|
|
|
|
CMD ["/sbin/my_init"] |