mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-08 05:56:38 +00:00
Add ee install option
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
name: pangolin
|
name: pangolin
|
||||||
services:
|
services:
|
||||||
pangolin:
|
pangolin:
|
||||||
image: docker.io/fosrl/pangolin:{{.PangolinVersion}}
|
image: docker.io/fosrl/pangolin:{{if .IsEnterprise}}ee-{{end}}{{.PangolinVersion}}
|
||||||
container_name: pangolin
|
container_name: pangolin
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -54,13 +54,31 @@ func readBool(reader *bufio.Reader, prompt string, defaultValue bool) bool {
|
|||||||
if defaultValue {
|
if defaultValue {
|
||||||
defaultStr = "yes"
|
defaultStr = "yes"
|
||||||
}
|
}
|
||||||
|
for {
|
||||||
input := readString(reader, prompt+" (yes/no)", defaultStr)
|
input := readString(reader, prompt+" (yes/no)", defaultStr)
|
||||||
return strings.ToLower(input) == "yes"
|
lower := strings.ToLower(input)
|
||||||
|
if lower == "yes" {
|
||||||
|
return true
|
||||||
|
} else if lower == "no" {
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
fmt.Println("Please enter 'yes' or 'no'.")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func readBoolNoDefault(reader *bufio.Reader, prompt string) bool {
|
func readBoolNoDefault(reader *bufio.Reader, prompt string) bool {
|
||||||
|
for {
|
||||||
input := readStringNoDefault(reader, prompt+" (yes/no)")
|
input := readStringNoDefault(reader, prompt+" (yes/no)")
|
||||||
return strings.ToLower(input) == "yes"
|
lower := strings.ToLower(input)
|
||||||
|
if lower == "yes" {
|
||||||
|
return true
|
||||||
|
} else if lower == "no" {
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
fmt.Println("Please enter 'yes' or 'no'.")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func readInt(reader *bufio.Reader, prompt string, defaultValue int) int {
|
func readInt(reader *bufio.Reader, prompt string, defaultValue int) int {
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ type Config struct {
|
|||||||
DoCrowdsecInstall bool
|
DoCrowdsecInstall bool
|
||||||
EnableGeoblocking bool
|
EnableGeoblocking bool
|
||||||
Secret string
|
Secret string
|
||||||
|
IsEnterprise bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type SupportedContainer string
|
type SupportedContainer string
|
||||||
@@ -339,6 +340,8 @@ func collectUserInput(reader *bufio.Reader) Config {
|
|||||||
// Basic configuration
|
// Basic configuration
|
||||||
fmt.Println("\n=== Basic Configuration ===")
|
fmt.Println("\n=== Basic Configuration ===")
|
||||||
|
|
||||||
|
config.IsEnterprise = readBoolNoDefault(reader, "Do you want to install the Enterprise version of Pangolin? The EE is free for persoal use or for businesses making less than 100k USD annually.")
|
||||||
|
|
||||||
config.BaseDomain = readString(reader, "Enter your base domain (no subdomain e.g. example.com)", "")
|
config.BaseDomain = readString(reader, "Enter your base domain (no subdomain e.g. example.com)", "")
|
||||||
|
|
||||||
// Set default dashboard domain after base domain is collected
|
// Set default dashboard domain after base domain is collected
|
||||||
|
|||||||
Reference in New Issue
Block a user