setup

package
v0.1.2-0...-a4b4768 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagNoCompose              = "no-compose"
	FlagDyoVersion             = "dyo-version"
	FlagDeployTestMail         = "deploy-test-mail"
	FlagDeployTraefik          = "deploy-traefik"
	FlagAddTraefikLabels       = "add-traefik-labels"
	FlagUseHTTPS               = "use-https"
	FlagAcmeEmail              = "acme-email"
	FlagDomain                 = "domain"
	FlagSMTPUri                = "smtp-uri"
	FlagFromEmail              = "from-email"
	FlagFromName               = "from-name"
	FlagCruxEncryptionKey      = "encryption-secret-key"
	FlagKratosPostgresPassword = "kratos-postgres-password" // #nosec 101 // these are not passwords
	FlagCruxPostgresPassword   = "crux-postgres-password"   // #nosec 101 // these are not passwords
	FlagRootPostgresPassword   = "root-postgres-password"   // #nosec 101 // these are not passwords
	FlagCruxSecret             = "crux-secret"
	FlagKratosSecret           = "kratos-secret"
	FlagComposeDir             = "compose-dir"
)

Variables

This section is empty.

Functions

func GenerateComposeConfig

func GenerateComposeConfig(cCtx *ucli.Context) error

func PromptBoolOrExit

func PromptBoolOrExit(sc *bufio.Scanner) bool

func PromptText

func PromptText(sc *bufio.Scanner) string

func Setup

func Setup() *ucli.Command

Types

type ComposeItem

type ComposeItem struct {
	Path    string
	Content []byte
}

type ComposeItems

type ComposeItems []ComposeItem

func GetItems

func GetItems(composeFolder string, deployTestMail, deployTraefik, addTraefikLabels, tls bool) ComposeItems

func (ComposeItems) GetFileNames

func (c ComposeItems) GetFileNames() []string

func (ComposeItems) WriteToDisk

func (c ComposeItems) WriteToDisk() error

type Config

type Config struct {
	AcmeEmail              string
	ComposeFile            string
	CruxSecret             string
	CruxPostgresPassword   string
	CruxAgentHost          string
	EncryptionSecretKey    string
	ExternalPort           string
	ExternalProto          string
	Domain                 string
	DyoVersion             string
	FromEmail              string
	FromName               string
	KratosPostgresPassword string
	KratosSecret           string
	RootPostgresPassword   string
	NodeEnv                string
	SmtpURI                string //nolint
	AddTraefikLabels       bool
	DeployTestMail         bool
	DeployTraefik          bool
	NoCompose              bool
	UseHTTPS               bool
}

func (*Config) PromptUserInput

func (cfg *Config) PromptUserInput()

func (*Config) ToMap

func (cfg *Config) ToMap() map[string]string

func (*Config) Validate

func (cfg *Config) Validate() error

Validate returns nil if valid the error contains the validation errors on failure

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL