containerlabels

package
v0.11.1-0...-8ab92b3 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Nitro is used to label a container as "for nitro"
	Nitro = "com.craftcms.nitro"

	// NitroContainer is used to identify a custom container added to the config
	NitroContainer = "com.craftcms.nitro.container"

	// NitroContainerPort is used to identify a custom containers port in the config
	NitroContainerPort = "com.craftcms.nitro.container-port"

	// DatabaseCompatibility is the compatibility of the database (e.g. mariadb and mysql are compatible)
	DatabaseCompatibility = "com.craftcms.nitro.database-compatibility"

	// DatabaseEngine is used to identify the engine that is being used for a database container (e.g. mysql, postgres)
	DatabaseEngine = "com.craftcms.nitro.database-engine"

	// DatabasePort is used to identify the port that is being used for a database container (e.g. mysql, postgres)
	DatabasePort = "com.craftcms.nitro.database-port"

	// DatabaseVersion is the version of the database the container is running (e.g. 11, 12, 5.7)
	DatabaseVersion = "com.craftcms.nitro.database-version"

	// Extensions is used for a list of comma seperated extensions for a site
	Extensions = "com.craftcms.nitro.extensions"

	// Host is used to identify a web application by the hostname of the site (e.g demo.nitro)
	Host = "com.craftcms.nitro.host"

	// PAth is used for containers that mount specific paths such as composer and npm
	Path = "com.craftcms.nitro.path"

	// Network is used to label a network for an environment
	Network = "com.craftcms.nitro.network"

	// Volume is used to identify a volume for an environment
	Volume = "com.craftcms.nitro.volume"

	// Proxy is the label used to identify the proxy container
	Proxy = "com.craftcms.nitro.proxy"

	// ProxyVersion is used to label a proxy container with a specific version
	ProxyVersion = "com.craftcms.nitro.proxy-version"

	// Type is used to identity the type of container
	Type = "com.craftcms.nitro.type"

	// Webroot is used to label a container with the webroot for the site
	Webroot = "com.craftcms.nitro.webroot"
)

Variables

This section is empty.

Functions

func ForCustomContainer

func ForCustomContainer(c config.Container) map[string]string

ForCustomContainer takes a custom container configuration and applies the labels for the container.

func ForSite

func ForSite(s config.Site) map[string]string

ForSite takes a site and returns labels to use on the sites container.

func Identify

func Identify(c types.Container) string

Identify takes an existing container and examines the labels to determine the type of container.

Types

This section is empty.

Jump to

Keyboard shortcuts

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