mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-09 09:05:26 +00:00
Add flag for specific grpc server addr (#295)
Adding flag to server for setting up listen addr of grpc: --grpc-addr / $WOODPECKER_GRPC_ADDR
This commit is contained in:
parent
d15769b17a
commit
cf19b41ad4
2 changed files with 7 additions and 1 deletions
|
@ -47,6 +47,12 @@ var flags = []cli.Flag{
|
|||
Name: "server-key",
|
||||
Usage: "server ssl key path",
|
||||
},
|
||||
cli.StringFlag{
|
||||
EnvVar: "WOODPECKER_GRPC_ADDR",
|
||||
Name: "grpc-addr",
|
||||
Usage: "grpc address",
|
||||
Value: ":9000",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
EnvVar: "DRONE_LETS_ENCRYPT,WOODPECKER_LETS_ENCRYPT",
|
||||
Name: "lets-encrypt",
|
||||
|
|
|
@ -108,7 +108,7 @@ func server(c *cli.Context) error {
|
|||
// start the grpc server
|
||||
g.Go(func() error {
|
||||
|
||||
lis, err := net.Listen("tcp", ":9000")
|
||||
lis, err := net.Listen("tcp", c.String("grpc-addr"))
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue