janhoy commented on a change in pull request #2038: URL: https://github.com/apache/lucene-solr/pull/2038#discussion_r514559651
########## File path: solr/contrib/prometheus-exporter/bin/solr-exporter ########## @@ -135,15 +134,42 @@ if $cygwin; then [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"` fi +# Convert Environment Variables to Command Line Options +EXPORTER_ARGS=() + +if [[ -n "$CONFIG_FILE" ]]; then + EXPORTER_ARGS+=(-f "$CONFIG_FILE") +fi + +if [[ -n "$PORT" ]]; then Review comment: For a docker env it's not a problem, and for most servers you'll have a separate service user with clean shell. Developers could unintentionally have the PORT var set on their laptop, but I don't think we should make design decisions from that. On a side note, I tested what would happen if you have both env `$PORT=1111` and arg `-p 2222`, and the last arg will win, thus you can override any env with explicit command arg, which I guess is a good thing. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org