forked from bentol/prometheus-nginxlog-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update container entrypoint to restart when config file changes
- Loading branch information
Showing
2 changed files
with
12 additions
and
3 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,12 +1,18 @@ | ||
FROM golang:1.13 | ||
FROM golang:1.13-alpine | ||
|
||
COPY . /work | ||
|
||
WORKDIR /work | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o prometheus-nginxlog-exporter | ||
|
||
FROM scratch | ||
FROM alpine | ||
|
||
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing watchexec | ||
|
||
COPY --from=0 /work/prometheus-nginxlog-exporter /prometheus-nginxlog-exporter | ||
ADD entrypoint.sh /entrypoint.sh | ||
|
||
EXPOSE 4040 | ||
ENTRYPOINT ["/prometheus-nginxlog-exporter"] | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
watchexec -v -w "/etc/prometheus-nginxlog-exporter/" -n -r /prometheus-nginxlog-exporter |