Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow server port to be set via environment variable #220

Merged
merged 1 commit into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion config/bulldozer.example.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Options for the http server
server:
# The listen address and port
# The listen address. Can also be set by the BULLDOZER_ADDRESS environment
# variable.
address: "0.0.0.0"
# The listen port. Can also be set by the BULLDOZER_PORT environment
# variable.
port: 8080
# Uncomment the "tls_config" block to enable HTTPS support in the server.
# The cert and key files must be usable by net/http.ListenAndServeTLS().
# Cert and Key file can also be set by the BULLDOZER_TLS_CERT_FILE and
# BULLDOZER_TLS_KEY_FILE environment variables, respectively.
# tls_config:
# cert_file: /path/to/server.pem
# key_file: /path/to/server.key
Expand Down
1 change: 1 addition & 0 deletions server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func ParseConfig(bytes []byte) (*Config, error) {
}

c.Github.SetValuesFromEnv("")
c.Server.SetValuesFromEnv("BULLDOZER_")
if v, ok := os.LookupEnv("BULLDOZER_PUSH_RESTRICTION_USER_TOKEN"); ok {
c.Options.PushRestrictionUserToken = v
}
Expand Down