Skip to content

Commit

Permalink
Use yaml as config file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
buraksezer committed Oct 3, 2019
1 parent d22eea0 commit bda50f0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ ADD . /go/src/github.com/buraksezer/olric
WORKDIR /go/src/github.com/buraksezer/olric
RUN go build -o bin/olricd ./cmd/olricd
EXPOSE 3320 3322
ENTRYPOINT bin/olricd -c cmd/olricd/olricd.toml
ENTRYPOINT bin/olricd -c cmd/olricd/olricd.yaml
2 changes: 1 addition & 1 deletion cmd/olricd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Flags:
Shows version information.
-c -config
Sets configuration file path. Default is /etc/olricd.yml
Sets configuration file path. Default is /etc/olricd.yaml
Set OLRICD_CONFIG to overwrite it.
The Go runtime version %s
Expand Down
4 changes: 2 additions & 2 deletions cmd/olricd/olricd.yml → cmd/olricd/olricd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ memberlist:
environment: "local"
addr: "0.0.0.0:3322"
enableCompression: false
peers:
- "localhost:3325"
# peers:
# - "localhost:3325"

cache:
maxIdleDuration: ""
Expand Down
2 changes: 1 addition & 1 deletion cmd/olricd/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

const (
// DefaultConfigFile is the default configuration file path on a Unix-based operating system.
DefaultConfigFile = "olricd.yml"
DefaultConfigFile = "olricd.yaml"

// EnvConfigFile is the name of environment variable which can be used to override default configuration file path.
EnvConfigFile = "OLRICD_CONFIG"
Expand Down
2 changes: 1 addition & 1 deletion cmd/olricd/server/memberlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
memlist "github.com/hashicorp/memberlist"
)

// newMemberlistConf creates a new *memberlist.Config by parsing olricd.yml
// newMemberlistConf creates a new *memberlist.Config by parsing olricd.yaml
func newMemberlistConf(c *Config) (*memlist.Config, error) {
bindAddr, sport, err := net.SplitHostPort(c.Memberlist.Addr)
if err != nil {
Expand Down

0 comments on commit bda50f0

Please sign in to comment.