Skip to content

Commit

Permalink
Merge pull request #120 from graphite-project/DZ-1.1.6-1
Browse files Browse the repository at this point in the history
Release 1.1.6-1
  • Loading branch information
deniszh authored Oct 24, 2019
2 parents 9b8b862 + 58f52d9 commit 9b98fc0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.10.2 as base
FROM alpine:3.10.3 as base
LABEL maintainer="Denys Zhdanov <[email protected]>"

RUN true \
Expand Down Expand Up @@ -53,7 +53,7 @@ RUN true \
&& virtualenv /opt/graphite \
&& . /opt/graphite/bin/activate \
&& pip3 install \
django==1.11.24 \
django==1.11.25 \
django-statsd-mozilla \
fadvise \
gunicorn \
Expand All @@ -64,7 +64,7 @@ RUN true \
mysqlclient \
psycopg2

ARG version=1.1.5
ARG version=1.1.6

# install whisper
ARG whisper_version=${version}
Expand Down Expand Up @@ -93,12 +93,12 @@ RUN . /opt/graphite/bin/activate \
&& python3 ./setup.py install

# install statsd (as we have to use this ugly way)
ARG statsd_version=8d5363cb109cc6363661a1d5813e0b96787c4411
ARG statsd_repo=https://github.com/etsy/statsd.git
ARG statsd_version=0.8.5
ARG statsd_repo=https://github.com/statsd/statsd.git
WORKDIR /opt
RUN git clone "${statsd_repo}" \
&& cd /opt/statsd \
&& git checkout "${statsd_version}" \
&& git checkout tags/v"${statsd_version}" \
&& npm install

COPY conf/opt/graphite/conf/ /opt/defaultconf/graphite/
Expand All @@ -124,7 +124,6 @@ COPY conf /
# copy /opt from build image
COPY --from=build /opt /opt


# defaults
EXPOSE 80 2003-2004 2013-2014 2023-2024 8080 8125 8125/udp 8126
VOLUME ["/opt/graphite/conf", "/opt/graphite/storage", "/opt/graphite/webapp/graphite/functions/custom", "/etc/nginx", "/opt/statsd/config", "/etc/logrotate.d", "/var/log", "/var/lib/redis"]
Expand Down
3 changes: 3 additions & 0 deletions conf/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ shutdown() {
sv force-stop $_srv
done

echo "shutting down runsvdir"

# shutdown runsvdir command
kill -HUP $RUNSVDIR
wait $RUNSVDIR

# give processes time to stop
sleep 0.5

echo "killing rest processes"
# kill any other processes still running in the container
for _pid in $(ps -eo pid | grep -v PID | tr -d ' ' | grep -v '^1$' | head -n -6); do
timeout -t 5 /bin/sh -c "kill $_pid && wait $_pid || kill -9 $_pid"
Expand Down
2 changes: 1 addition & 1 deletion conf/etc/service/graphite/run
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if folder_empty /opt/graphite/webapp/graphite/functions/custom; then
fi

export GRAPHITE_WSGI_PROCESSES=${GRAPHITE_WSGI_PROCESSES:-4}
export GRAPHITE_WSGI_THREADS=${GRAPHITE_WSGI_THREADS:-2}
export GRAPHITE_WSGI_THREADS=${GRAPHITE_WSGI_THREADS:-1}
export GRAPHITE_WSGI_REQUEST_TIMEOUT=${GRAPHITE_WSGI_REQUEST_TIMEOUT:-65}
export GRAPHITE_WSGI_REQUEST_LINE=${GRAPHITE_WSGI_REQUEST_LINE:-0}
export GRAPHITE_WSGI_MAX_REQUESTS=${GRAPHITE_WSGI_MAX_REQUESTS:-1000}
Expand Down
1 change: 1 addition & 0 deletions conf/etc/service/redis/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh

[ -n "${REDIS_TAGDB}" ] || exit 0
mkdir -p /var/log/redis/
exec /usr/bin/redis-server /etc/redis/redis.conf
2 changes: 1 addition & 1 deletion conf/opt/graphite/conf/carbon.conf
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ WHISPER_AUTOFLUSH = False
# MAX_CREATES_PER_MINUTE. If enabled on an OS or filesystem that is unsupported
# this option will gracefully fallback to standard POSIX file access methods.
# If enabled, disables WHISPER_SPARSE_CREATE regardless of the value.
WHISPER_FALLOCATE_CREATE = True
WHISPER_FALLOCATE_CREATE = False

# Enabling this option will cause Whisper to lock each Whisper file it writes
# to with an exclusive lock (LOCK_EX, see: man 2 flock). This is useful when
Expand Down

0 comments on commit 9b98fc0

Please sign in to comment.