|
| 1 | +FROM ubuntu:trusty |
| 2 | + |
| 3 | +ENV DEBIAN_FRONTEND noninteractive |
| 4 | + |
| 5 | +# REPOS |
| 6 | +RUN apt-get --yes update && \ |
| 7 | + apt-get install -y software-properties-common && \ |
| 8 | + add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" && \ |
| 9 | + add-apt-repository -y ppa:chris-lea/node.js && \ |
| 10 | + add-apt-repository -y ppa:nginx/stable && \ |
| 11 | + apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 && \ |
| 12 | + echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list && \ |
| 13 | + mkdir -p /data/db && \ |
| 14 | + apt-get --yes update && \ |
| 15 | + apt-get install -y -q curl git wget mongodb-10gen nodejs supervisor imagemagick nginx build-essential |
| 16 | + |
| 17 | +#SHIMS |
| 18 | +RUN dpkg-divert --local --rename --add /sbin/initctl && \ |
| 19 | + rm /sbin/initctl && \ |
| 20 | + ln -s /bin/true /sbin/initctl |
| 21 | + |
| 22 | +ENV DEBIAN_FRONTEND dialog |
| 23 | + |
| 24 | +## Setup Countly |
| 25 | +COPY / /opt/countly |
| 26 | +RUN mkdir -p /data/log && \ |
| 27 | + cd /opt/countly/api ; npm install time && \ |
| 28 | + rm /etc/nginx/sites-enabled/default && \ |
| 29 | + cp /opt/countly/bin/config/nginx.server.conf /etc/nginx/sites-enabled/default && \ |
| 30 | + cp /opt/countly/frontend/express/public/javascripts/countly/countly.config.sample.js /opt/countly/frontend/express/public/javascripts/countly/countly.config.js && \ |
| 31 | + cp /opt/countly/api/config.sample.js /opt/countly/api/config.js && \ |
| 32 | + cp /opt/countly/frontend/express/config.sample.js /opt/countly/frontend/express/config.js |
| 33 | + |
| 34 | +ADD ./supervisor/supervisord.conf /etc/supervisor/supervisord.conf |
| 35 | +ADD ./supervisor/conf.d/nginx.conf /etc/supervisor/conf.d/nginx.conf |
| 36 | +ADD ./supervisor/conf.d/mongodb.conf /etc/supervisor/conf.d/mongodb.conf |
| 37 | +ADD ./supervisor/conf.d/countly.conf /etc/supervisor/conf.d/countly.conf |
| 38 | + |
| 39 | +EXPOSE 80 |
| 40 | +VOLUME ["/data"] |
| 41 | +CMD [] |
| 42 | +ENTRYPOINT ["/usr/bin/supervisord"] |
0 commit comments