-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.go
More file actions
24 lines (20 loc) · 659 Bytes
/
main.go
File metadata and controls
24 lines (20 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package main
import (
"flag"
"os"
"github.com/phedoreanu/rancher-auto-redeploy/api"
)
func main() {
BindPort := flag.Int("port", 8091, "Port to bind for listening for Docker Hub Webhooks.")
BindAddress := flag.String("address", "0.0.0.0", "Bind Address to bind for listening for Docker Hub webhooks.")
autoRedeploy := &api.RancherAPI{
Address: *BindAddress,
Port: *BindPort,
Host: os.Getenv("RANCHER_HOST"),
ProjectID: os.Getenv("RANCHER_PROJECT_ID"),
APIKey: os.Getenv("RANCHER_API_KEY"),
APISecret: os.Getenv("RANCHER_API_SECRET"),
DockerHubKey: os.Getenv("DOCKER_HUB_KEY"),
}
autoRedeploy.Run()
}