mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-25 02:04:06 +02:00
add graphite-arm
This commit is contained in:
parent
ce71b394b1
commit
e0166b7ffb
58
graphite/arm/Dockerfile
Normal file
58
graphite/arm/Dockerfile
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile for graphite-arm
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM easypi/alpine-arm
|
||||||
|
MAINTAINER EasyPi Software Foundation
|
||||||
|
|
||||||
|
ENV PATH=$PATH:/opt/graphite/bin
|
||||||
|
ENV PYTHONPATH=/opt/graphite/lib:/opt/graphite/webapp
|
||||||
|
ENV GRAPHITE_CONF_DIR=/opt/graphite/conf
|
||||||
|
ENV GRAPHITE_STORAGE_DIR=/opt/graphite/storage
|
||||||
|
|
||||||
|
WORKDIR /opt/graphite
|
||||||
|
|
||||||
|
RUN set -xe \
|
||||||
|
&& apk update \
|
||||||
|
&& apk add build-base \
|
||||||
|
cairo \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
libffi-dev \
|
||||||
|
python \
|
||||||
|
python-dev \
|
||||||
|
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
|
&& pip install gunicorn \
|
||||||
|
supervisor \
|
||||||
|
https://github.com/graphite-project/whisper/tarball/master \
|
||||||
|
https://github.com/graphite-project/carbon/tarball/master \
|
||||||
|
https://github.com/graphite-project/graphite-web/tarball/master \
|
||||||
|
-r https://github.com/graphite-project/graphite-web/raw/master/requirements.txt \
|
||||||
|
&& cd conf \
|
||||||
|
&& cp carbon.conf.example carbon.conf \
|
||||||
|
&& cp storage-schemas.conf.example storage-schemas.conf \
|
||||||
|
&& cd ../webapp \
|
||||||
|
&& echo "SECRET_KEY = '$(head -c 16 /dev/urandom | base64)'" > graphite/local_settings.py \
|
||||||
|
&& curl -sSL https://github.com/graphite-project/graphite-web/raw/master/webapp/manage.py > manage.py \
|
||||||
|
&& chmod +x manage.py \
|
||||||
|
&& python manage.py migrate --run-syncdb --noinput \
|
||||||
|
&& apk del build-base \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
libffi-dev \
|
||||||
|
python-dev \
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
/var/cache/apk/*
|
||||||
|
|
||||||
|
COPY supervisord.conf /etc/supervisor/
|
||||||
|
|
||||||
|
VOLUME $GRAPHITE_CONF_DIR \
|
||||||
|
$GRAPHITE_STORAGE_DIR
|
||||||
|
|
||||||
|
EXPOSE 2003 \
|
||||||
|
2004 \
|
||||||
|
7002 \
|
||||||
|
8080 \
|
||||||
|
9001
|
||||||
|
|
||||||
|
CMD ["supervisord", "-n"]
|
11
graphite/arm/docker-compose.yml
Normal file
11
graphite/arm/docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
graphite:
|
||||||
|
image: easypi/graphite-arm
|
||||||
|
ports:
|
||||||
|
- 2003:2003
|
||||||
|
- 2004:2004
|
||||||
|
- 7002:7002
|
||||||
|
- 8080:8080
|
||||||
|
- 9001:9001
|
||||||
|
volumes:
|
||||||
|
- ./data:/opt/graphite/storage
|
||||||
|
restart: always
|
22
graphite/arm/supervisord.conf
Normal file
22
graphite/arm/supervisord.conf
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[supervisord]
|
||||||
|
loglevel = info
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[inet_http_server]
|
||||||
|
port = 0.0.0.0:9001
|
||||||
|
|
||||||
|
[supervisorctl]
|
||||||
|
serverurl = http://127.0.0.1:9001
|
||||||
|
|
||||||
|
[program:carbon-cache]
|
||||||
|
command = carbon-cache.py --debug start
|
||||||
|
redirect_stderr = true
|
||||||
|
autorestart = true
|
||||||
|
|
||||||
|
[program:graphite-webapp]
|
||||||
|
command = gunicorn -b :8080 graphite.wsgi:application
|
||||||
|
directory = /opt/graphite/webapp
|
||||||
|
redirect_stderr = true
|
||||||
|
autorestart = true
|
Loading…
Reference in New Issue
Block a user