Browse Source

Added comments clarifying certain behaviors when using multiapp mode.

multi-app
Benjamin Shelton 4 months ago
parent
commit
9d4d0cd735
1 changed files with 21 additions and 7 deletions
  1. +21
    -7
      config/options.go

+ 21
- 7
config/options.go View File

@@ -77,18 +77,18 @@ type EnvironmentConfig struct {
// true, the environment mode must be set via `EnvironmentMode` directly.
DisableModeEnvVar bool

// MultiAppConfig controls multi-application support for the current Capstan environment.
// MultiAppConfig controls multi-application support for the current Capstan
// environment.
MultiAppConfig *MultiAppConfig

// Applications contains configurations per application, mapped by name.
Applications map[string]*Config
}

// ApplicationConfiguration per-application. In stand alone mode, this will
// contain generalized configurations for each application. Otherwise, in
// multiapp mode, this will be used for each application. This allows Capstan to
// track configurations for each application hosted by a single Capstan
// instance.
// ApplicationConfig per-application. In stand alone mode, this will contain
// generalized configurations for each application. Otherwise, in multiapp mode,
// this will be used for each application. This allows Capstan to track
// configurations for each application hosted by a single Capstan instance.
type ApplicationConfig struct {
// Name of the environment (or applciation host if using multiapp move).
Name string
@@ -115,8 +115,14 @@ type ApplicationConfig struct {
// DisableModeEnvVar disables the mode setting environment variable. If
// true, the environment mode must be set via `EnvironmentMode` directly.
DisableModeEnvVar bool

// WorkingDir configures the working directory for this application.
WorkingDir string
}

// ServerConfig controls basic server configuration, such as the listening host
// and port, as well as a few per-application (when running in multiapp mode)
// tweaks, such as domain name and TLS support.
type ServerConfig struct {
// NoColor disables all ANSI control characters that generate color output.
// This may be set externally or via the NO_COLOR environment variable.
@@ -133,9 +139,17 @@ type ServerConfig struct {
// application will listen on for TLS-enabled connections.
//
// Leaving this value as the empty string will disable TLS support.
//
// When using multi-app mode with multiple domains, Capstan doesn't
// currently allow for hosting multiple certificates directly. This means
// you will either need to generate a certificate where the subjectAltName
// contains all of the domains hosted behind a multiapp instance or you will
// need to run Capstan behind a reverse HTTP proxy like nginx.
ListenAddressTLS string

// PreferTLS controls URL scheme generation. If true, links to Capstan-hosted applications will be prefixed with "https" if ListenAddressTLS is set.
// PreferTLS controls URL scheme generation. If true, links to
// Capstan-hosted applications will be prefixed with "https" if
// ListenAddressTLS is set.
PreferTLS bool

// ListenSocket controls whether or not Capstan will listen on a UNIX domain


Loading…
Cancel
Save