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

View File

@ -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 \

View File

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

View File

@ -1,10 +1,16 @@
statsd: version: "3.8"
image: vimagick/statsd
ports: services:
- "8126:8126/tcp" statsd:
- "8125:8125/udp" image: vimagick/statsd
volumes: ports:
- ./data/config.js:/opt/statsd/config.js - "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