diff --git a/Dockerfile b/Dockerfile index 9ef98f3..53c63dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,24 +28,25 @@ RUN pip install django==1.5.12\ python-memcached==1.53\ django-tagging==0.3.1\ twisted==11.1.0\ - txAMQP==0.6.2 + txAMQP==0.6.2\ + pytz # install graphite -RUN git clone -b 0.9.15 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web +RUN git clone -b 1.0.1 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web WORKDIR /usr/local/src/graphite-web RUN python ./setup.py install ADD conf/opt/graphite/conf/*.conf /opt/graphite/conf/ ADD conf/opt/graphite/webapp/graphite/local_settings.py /opt/graphite/webapp/graphite/local_settings.py ADD conf/opt/graphite/webapp/graphite/app_settings.py /opt/graphite/webapp/graphite/app_settings.py -RUN python /opt/graphite/webapp/graphite/manage.py collectstatic --noinput +RUN python /usr/local/src/graphite-web/webapp/manage.py collectstatic --noinput # install whisper -RUN git clone -b 0.9.15 --depth 1 https://github.com/graphite-project/whisper.git /usr/local/src/whisper +RUN git clone -b 1.0.1 --depth 1 https://github.com/graphite-project/whisper.git /usr/local/src/whisper WORKDIR /usr/local/src/whisper RUN python ./setup.py install # install carbon -RUN git clone -b 0.9.15 --depth 1 https://github.com/graphite-project/carbon.git /usr/local/src/carbon +RUN git clone -b 1.0.1 --depth 1 https://github.com/graphite-project/carbon.git /usr/local/src/carbon WORKDIR /usr/local/src/carbon RUN python ./setup.py install @@ -59,6 +60,7 @@ ADD conf/etc/nginx/nginx.conf /etc/nginx/nginx.conf ADD conf/etc/nginx/sites-enabled/graphite-statsd.conf /etc/nginx/sites-enabled/graphite-statsd.conf # init django admin +RUN mkdir -p /usr/local/src/graphite-web/storage/log/webapp ADD conf/usr/local/bin/django_admin_init.exp /usr/local/bin/django_admin_init.exp RUN /usr/local/bin/django_admin_init.exp diff --git a/conf/etc/my_init.d/01_conf_init.sh b/conf/etc/my_init.d/01_conf_init.sh index e44f53b..d55fa0c 100755 --- a/conf/etc/my_init.d/01_conf_init.sh +++ b/conf/etc/my_init.d/01_conf_init.sh @@ -12,7 +12,7 @@ graphite_conf_dir_contents=$(find /opt/graphite/conf -mindepth 1 -print -quit) graphite_webapp_dir_contents=$(find /opt/graphite/webapp/graphite -mindepth 1 -print -quit) graphite_storage_dir_contents=$(find /opt/graphite/storage -mindepth 1 -print -quit) if [[ -z $graphite_dir_contents ]]; then - git clone -b 0.9.15 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web + git clone -b 1.0.1 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web cd /usr/local/src/graphite-web && python ./setup.py install fi if [[ -z $graphite_storage_dir_contents ]]; then diff --git a/conf/etc/service/graphite/run b/conf/etc/service/graphite/run index 211a6d1..db62ce8 100755 --- a/conf/etc/service/graphite/run +++ b/conf/etc/service/graphite/run @@ -1,4 +1,4 @@ #!/bin/bash -exec /usr/bin/python /opt/graphite/webapp/graphite/manage.py runfcgi daemonize=false host=127.0.0.1 port=8080 +exec /usr/bin/python /usr/local/src/graphite-web/webapp/manage.py runfcgi daemonize=false host=127.0.0.1 port=8080 diff --git a/conf/usr/local/bin/django_admin_init.exp b/conf/usr/local/bin/django_admin_init.exp index d6173a4..d2f95d3 100755 --- a/conf/usr/local/bin/django_admin_init.exp +++ b/conf/usr/local/bin/django_admin_init.exp @@ -1,7 +1,7 @@ #!/usr/bin/env expect set timeout -1 -spawn python /opt/graphite/webapp/graphite/manage.py syncdb +spawn python /usr/local/src/graphite-web/webapp/manage.py syncdb expect "Would you like to create one now" { send "yes\r"