1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 11:58:47 +00:00

upgrade statsd to 0.9.0

This commit is contained in:
kev 2021-11-11 17:14:06 +08:00
parent 4e84f63aa4
commit 1555375639
3 changed files with 35 additions and 21 deletions

@ -5,13 +5,13 @@
FROM alpine:3 FROM alpine:3
MAINTAINER EasyPi Software Foundation MAINTAINER EasyPi Software Foundation
ENV STATSD_VERSION 0.8.6 ENV STATSD_VERSION=0.9.0
ENV STATSD_URL https://github.com/etsy/statsd/archive/v$STATSD_VERSION.tar.gz ENV STATSD_URL=https://github.com/statsd/statsd/archive/refs/tags/v$STATSD_VERSION.tar.gz
WORKDIR /opt/statsd WORKDIR /opt/statsd
RUN set -xe \ RUN set -xe \
&& apk add --no-cache ca-certificates curl nodejs nodejs-npm tar \ && apk add --no-cache ca-certificates curl nodejs npm tar \
&& curl -sSL $STATSD_URL | tar xz --strip 1 \ && curl -sSL $STATSD_URL | tar xz --strip 1 \
&& npm install --production \ && npm install --production \
&& sed 's/graphite.example.com/graphite/' exampleConfig.js > config.js \ && sed 's/graphite.example.com/graphite/' exampleConfig.js > config.js \

@ -8,14 +8,22 @@ to one or more pluggable backend services (e.g., [Graphite][2]).
## docker-compose.yml ## docker-compose.yml
```yaml ```yaml
version: "3.8"
services:
statsd: statsd:
image: vimagick/statsd image: vimagick/statsd
ports: ports:
- "8125:8125/udp"
- "8126:8126/tcp" - "8126:8126/tcp"
external_links: - "8125:8125/udp"
- graphite_graphite_1:graphite volumes:
restart: always - ./data/config.js:/opt/statsd/config.js
restart: unless-stopped
networks:
default:
external: true
name: graphite_default
``` ```
## python client ## python client

@ -1,3 +1,6 @@
version: "3.8"
services:
statsd: statsd:
image: vimagick/statsd image: vimagick/statsd
ports: ports:
@ -5,6 +8,9 @@ statsd:
- "8125:8125/udp" - "8125:8125/udp"
volumes: volumes:
- ./data/config.js:/opt/statsd/config.js - ./data/config.js:/opt/statsd/config.js
external_links: restart: unless-stopped
- graphite_graphite_1:graphite
restart: always networks:
default:
external: true
name: graphite_default