<commit_before>FROM     ubuntu:14.04.1

# Install prerequisites
RUN apt-get -y update && \
  apt-get -y install python-dev \
  python-pip \
  
  nginx

RUN pip install https://github.com/graphite-project/ceres/tarball/master \
  Django \
  django-tagging \
  whisper \
  carbon \
  graphite-web \
  uwsgi
  
# Configure Whisper, Carbon and Graphite-Web
ADD ./graphite/initial_data.json /opt/graphite/webapp/graphite/initial_data.json
ADD ./graphite/local_settings.py /opt/graphite/webapp/graphite/local_settings.py
ADD ./graphite/carbon.conf /opt/graphite/conf/carbon.conf
ADD ./graphite/storage-schemas.conf /opt/graphite/conf/storage-schemas.conf
ADD ./graphite/storage-aggregation.conf /opt/graphite/conf/storage-aggregation.conf
ADD ./graphite/wsgi.py /opt/graphite/conf/wsgi.py
RUN python /opt/graphite/webapp/graphite/manage.py syncdb --noinput
RUN chown -R www-data:www-data /opt/graphite/webapp/ /opt/graphite/storage/

# configure nginx
ADD nginx/nginx.conf /etc/nginx/nginx.conf
ADD nginx/graphite.conf /etc/nginx/sites-available/graphite.conf
RUN ln -s /etc/nginx/sites-available/graphite.conf /etc/nginx/sites-enabled/graphite.conf

# configure uwsgi
ADD uwsgi/graphite.ini /etc/uwsgi/graphite.ini

EXPOSE 8080 2003

CMD /opt/graphite/bin/carbon-cache.py start && \
  /usr/local/bin/uwsgi -d --ini /etc/uwsgi/graphite.ini && \
  /etc/init.d/nginx start<commit_msg>Todo to add shared volumes for storage and logs<commit_after>FROM     ubuntu:14.04.1

# Install prerequisites
RUN apt-get -y update && \
  apt-get -y install python-dev \
  python-pip \
  
  nginx

RUN pip install https://github.com/graphite-project/ceres/tarball/master \
  Django \
  django-tagging \
  whisper \
  carbon \
  graphite-web \
  uwsgi
  
# Configure Whisper, Carbon and Graphite-Web
ADD ./graphite/initial_data.json /opt/graphite/webapp/graphite/initial_data.json
ADD ./graphite/local_settings.py /opt/graphite/webapp/graphite/local_settings.py
ADD ./graphite/carbon.conf /opt/graphite/conf/carbon.conf
ADD ./graphite/storage-schemas.conf /opt/graphite/conf/storage-schemas.conf
ADD ./graphite/storage-aggregation.conf /opt/graphite/conf/storage-aggregation.conf
ADD ./graphite/wsgi.py /opt/graphite/conf/wsgi.py
RUN python /opt/graphite/webapp/graphite/manage.py syncdb --noinput
RUN chown -R www-data:www-data /opt/graphite/webapp/ /opt/graphite/storage/

# configure nginx
ADD nginx/nginx.conf /etc/nginx/nginx.conf
ADD nginx/graphite.conf /etc/nginx/sites-available/graphite.conf
RUN ln -s /etc/nginx/sites-available/graphite.conf /etc/nginx/sites-enabled/graphite.conf

# configure uwsgi
ADD uwsgi/graphite.ini /etc/uwsgi/graphite.ini

# TODO Add shared volumes 

EXPOSE 8080 2003

CMD /opt/graphite/bin/carbon-cache.py start && \
  /usr/local/bin/uwsgi -d --ini /etc/uwsgi/graphite.ini && \
  /etc/init.d/nginx start
{'fraction_non_alphanumeric': 0.1282871357498223, 'fraction_numerical': 0.00923951670220327, 'mean_word_length': 3.482484076433121, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '875250', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1034, 'n_words': 187}