This repository has been archived by the owner on Jan 23, 2025. It is now read-only.
forked from SamSaffron/graphite_docker
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathDockerfile
52 lines (40 loc) · 2.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from ubuntu:14.04
run apt-get -y update
run apt-get -y install libcairo2-dev libffi-dev pkg-config python-dev python-pip fontconfig apache2 libapache2-mod-wsgi git-core collectd memcached gcc g++ make supervisor nginx-light gunicorn
run cd /usr/local/src && git clone https://github.com/graphite-project/graphite-web.git
run cd /usr/local/src && git clone https://github.com/graphite-project/carbon.git
run cd /usr/local/src && git clone https://github.com/graphite-project/whisper.git
run cd /usr/local/src/whisper && git checkout master && python setup.py install
run cd /usr/local/src/carbon && git checkout 0.9.x && pip install -r requirements.txt; python setup.py install
run cd /usr/local/src/graphite-web && git checkout 0.9.x && pip install -r requirements.txt; python check-dependencies.py; python setup.py install
# Add graphite config
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/events_views.py /opt/graphite/webapp/graphite/events/views.py
run mkdir -p /opt/graphite/storage/whisper
run touch /opt/graphite/storage/graphite.db /opt/graphite/storage/index
run chown -R www-data /opt/graphite/storage
run chmod 0775 /opt/graphite/storage /opt/graphite/storage/whisper
run chmod 0664 /opt/graphite/storage/graphite.db
run cd /opt/graphite/webapp/graphite && python manage.py syncdb --noinput
add ./my_htpasswd /etc/nginx/.htpasswd
# Add system service config
add ./nginx/nginx.conf /etc/nginx/nginx.conf
add ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Nginx
#
# graphite
expose 80
# grafana
expose 81
# Carbon line receiver port
expose 2003
# Carbon cache query port
expose 7002
VOLUME ["/opt/graphite/storage/whisper"]
VOLUME ["/var/lib/log/supervisor"]
cmd ["/usr/bin/supervisord"]
# vim:ts=8:noet: