Skip to content

Commit 34886af

Browse files
authored
Merge pull request #90 from raffis/fallback-path
fix: support /etc/mongodb-query-exporter as default config lookup path
2 parents 9905dca + 3df7ac7 commit 34886af

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Dockerfile

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ RUN make deps build
88

99
FROM gcr.io/distroless/base
1010
COPY --from=builder /go/src/github.com/raffis/mongodb-query-exporter/mongodb-query-exporter /bin/mongodb-query-exporter
11-
12-
ENV MDBEXPORTER_CONFIG /etc/mongodb-query-exporter/config.yaml
1311
USER 1000:1000
1412

1513
EXPOSE 9412

cmd/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ func initConfig() {
157157
}
158158

159159
// System wide config
160+
viper.AddConfigPath("/etc/mongodb-query-exporter")
160161
viper.AddConfigPath("/etc/mongodb_query_exporter")
161162
}
162163

0 commit comments

Comments
 (0)