-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add volume to point to config file and add healthcheck
- Loading branch information
Edward Nys
committed
Oct 7, 2018
1 parent
8d5363c
commit d9d3860
Showing
1 changed file
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
FROM node:5-onbuild | ||
|
||
VOLUME /etc/statsd/ | ||
COPY exampleConfig.js /etc/statsd/config.js | ||
RUN \ | ||
cp -v exampleConfig.js config.js && \ | ||
sed -i 's/graphite.example.com/graphite/' config.js | ||
sed -i 's/graphite.example.com/graphite/' /etc/statsd/config.js | ||
|
||
EXPOSE 8125/udp | ||
EXPOSE 8125/UDP | ||
EXPOSE 8126 | ||
RUN apt-get -y update && \ | ||
apt-get -y install --no-install-recommends \ | ||
netcat=1.10-41 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENTRYPOINT [ "node", "stats.js", "config.js" ] | ||
CMD [ "node", "stats.js", "/etc/statsd/config.js" ] | ||
HEALTHCHECK --interval=30s --timeout=2s --retries=3 CMD nc -vv -z -u 127.0.0.1 8125 |