forked from SamSaffron/graphite_docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
68 lines (50 loc) · 2.02 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from ubuntu:14.04
run echo 'deb http://us.archive.ubuntu.com/ubuntu/ trusty universe' >> /etc/apt/sources.list
run apt-get -y update
run apt-get -y install software-properties-common &&\
add-apt-repository ppa:chris-lea/node.js &&\
apt-get -y update
run apt-get -y install python-django-tagging python-simplejson python-memcache \
python-ldap python-cairo python-django python-twisted \
python-pysqlite2 python-support python-pip gunicorn \
supervisor nginx-light nodejs git wget curl
# Install statsd
run mkdir /src && git clone https://github.com/etsy/statsd.git /src/statsd
# Install required packages
run pip install whisper
run pip install --install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/lib" carbon
run pip install --install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/webapp" graphite-web
# grafana
run cd ~ &&\
wget https://grafanarel.s3.amazonaws.com/builds/grafana_2.1.3_amd64.deb &&\
dpkg -i grafana_2.1.3_amd64.deb && rm grafana_2.1.3_amd64.deb
# statsd
add ./statsd/config.js /src/statsd/config.js
# Add graphite config
add ./graphite/initial_data.json /var/lib/graphite/webapp/graphite/initial_data.json
add ./graphite/local_settings.py /var/lib/graphite/webapp/graphite/local_settings.py
add ./graphite/carbon.conf /var/lib/graphite/conf/carbon.conf
add ./graphite/storage-schemas.conf /var/lib/graphite/conf/storage-schemas.conf
add ./graphite/storage-aggregation.conf /var/lib/graphite/conf/storage-aggregation.conf
add ./grafana/config.ini /etc/grafana/config.ini
# 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 3000
# Carbon line receiver port
expose 2003
# Carbon pickle receiver port
expose 2004
# Carbon cache query port
expose 7002
# Statsd UDP port
expose 8125/udp
# Statsd Management port
expose 8126
add ./bin/init /usr/bin/init
cmd /usr/bin/init