Skip to content

Commit 0f9d25c

Browse files
authored
Merge pull request #4 from it-novum/development
openITCOCKPIT 4.2
2 parents 2bce1de + 8a7df4e commit 0f9d25c

File tree

4 files changed

+23
-17
lines changed

4 files changed

+23
-17
lines changed

carbon-cache/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,26 @@ RUN apk --no-cache add python3 libffi
66

77
RUN apk --no-cache add python3-dev gcc libc-dev py3-pip libffi-dev
88

9-
RUN pip3 install --no-binary=:all: --install-option="--prefix=/opt/graphite" --install-option="--install-lib=/opt/graphite/lib" 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 && \
10-
touch /opt/graphite/lib/zope/__init__.py
9+
RUN pip3 install wheel urllib3
1110

11+
RUN pip3 install --no-binary=:all: 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
1212

13-
FROM alpine:latest
13+
14+
##FROM alpine:latest
1415

1516
ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/"
1617

17-
RUN apk --no-cache add python3 libffi
18+
##RUN apk --no-cache add python3 py3-pip libffi
19+
20+
##RUN pip3 install urllib3
1821

1922
RUN mkdir -p /etc/carbon /var/lib/graphite/whisper
2023

2124
VOLUME /etc/carbon
2225
VOLUME /var/lib/graphite/whisper
2326
EXPOSE 2003
2427

25-
COPY --from=build /opt/graphite /opt/graphite
28+
##COPY --from=build /opt/graphite /opt/graphite
2629

2730
CMD ["/opt/graphite/bin/carbon-cache.py", "--config=/etc/carbon/carbon.conf", "--nodaemon", "start"]
2831

graphite-web/Dockerfile

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,33 @@ ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/"
44

55
RUN apk --no-cache add python3 libffi py3-gunicorn cairo py3-setuptools
66

7-
RUN apk --no-cache add python3-dev gcc libc-dev py3-pip libffi-dev py3-gunicorn cairo py3-mysqlclient
7+
RUN apk --no-cache add python3-dev gcc libc-dev py3-pip libffi-dev py3-gunicorn cairo py3-mysqlclient py3-setuptools
8+
9+
RUN pip3 install wheel urllib3
810

911
# the touch fixes the missing __init__.py file from the broken zope.interface package ...
10-
RUN pip3 install --no-binary=:all: --install-option="--prefix=/opt/graphite" --install-option="--install-lib=/opt/graphite/lib" https://github.com/graphite-project/whisper/archive/1.1.6.zip https://github.com/graphite-project/carbon/archive/1.1.6.zip https://github.com/graphite-project/graphite-web/archive/1.1.6.zip "whitenoise==3.*" && \
11-
touch /opt/graphite/lib/zope/__init__.py
12+
RUN pip3 install --no-binary=:all: https://github.com/graphite-project/whisper/archive/1.1.6.zip https://github.com/graphite-project/carbon/archive/1.1.6.zip https://github.com/graphite-project/graphite-web/archive/1.1.6.zip "whitenoise==3.*"
1213

1314

14-
FROM alpine:latest
15+
##FROM alpine:latest
1516

16-
ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/"
17+
##ENV PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/"
18+
19+
##RUN apk --no-cache add python3 libffi py3-gunicorn cairo py3-setuptools py3-mysqlclient py3-pip
1720

18-
RUN apk --no-cache add python3 libffi py3-gunicorn cairo py3-setuptools py3-mysqlclient
21+
##RUN pip3 install urllib3
1922

2023
RUN mkdir -p /var/lib/graphite/whisper /etc/uwsgi /opt/graphite/webapp/graphite
2124

2225
COPY wsgi.py /opt/graphite/conf/
2326
#COPY local_settings.py /opt/graphite/lib/graphite/local_settings.py
2427

2528
# Link generated config
26-
RUN mkdir -p /opt/graphite/lib/graphite
27-
RUN ln -sf /etc/carbon/local_settings.py /opt/graphite/lib/graphite/local_settings.py
29+
RUN mkdir -p /opt/graphite/webapp/graphite/
30+
RUN ln -sf /etc/carbon/local_settings.py /opt/graphite/webapp/graphite/local_settings.py
2831

2932
COPY run.sh /run.sh
30-
COPY --from=build /opt/graphite /opt/graphite
33+
##COPY --from=build /opt/graphite /opt/graphite
3134

3235
VOLUME /var/lib/graphite/whisper
3336
EXPOSE 8080

graphite-web/local_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
MIDDLEWARE = ('whitenoise.middleware.WhiteNoiseMiddleware',) + MIDDLEWARE
239239
#STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
240240

241-
STATIC_ROOT = '/opt/graphite/webapp/content/'
241+
#STATIC_ROOT = '/opt/graphite/webapp/content/'
242242

243243

244244

graphite-web/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/sh
22

33

4-
/opt/graphite/bin/django-admin migrate --settings=graphite.settings --run-syncdb
4+
/usr/bin/django-admin migrate --settings=graphite.settings --run-syncdb
55
#/usr/bin/django-admin migrate --settings=graphite.settings --run-syncdb
66

77
cd /opt/graphite/webapp
88
mkdir -p /opt/graphite/lib/content
9-
/opt/graphite/bin/django-admin collectstatic --noinput --settings=graphite.settings
9+
/usr/bin/django-admin collectstatic --noinput --settings=graphite.settings
1010

1111
cd /opt/graphite/conf
1212
exec /usr/bin/gunicorn -w 4 -b 0.0.0.0:8080 wsgi:application

0 commit comments

Comments
 (0)