Dagger
Search

sai

No long description provided.

Installation

dagger install github.com/sai-php/sai@1015f56a42daff8888159b0fee04dd214e7dafd6

Entrypoint

Return Type
Sai
Example
func (m *myModule) example() *Sai  {
	return dag.
			Sai()
}

Types

Composer 🔗

install() 🔗

Perform a composer install and return the result as a directory

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
composerJsonFile !-No description provided
composerLockFile nullNo description provided
Example
func (m *myModule) example(container *Container, composerVersion string, composerCacheName string, composerJson *File) *Directory  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			Composer(composerVersion, composerCacheName).
			Install(composerJson)
}

NginxContainer 🔗

withAppCode() 🔗

Add application code to container

Return Type
NginxContainer !
Arguments
NameTypeDefault ValueDescription
appCodeDirectory !-No description provided
pathString !"\/app"No description provided
Example
func (m *myModule) example(version string, os string, appCode *Directory, path string) *SaiNginxContainer  {
	return dag.
			Sai().
			Nginx(version, os).
			WithAppCode(appCode, path)
}

withConfigTemplate() 🔗

Add config template to the container

Return Type
NginxContainer !
Arguments
NameTypeDefault ValueDescription
configTemplateFile !-No description provided
Example
func (m *myModule) example(version string, os string, configTemplate *File) *SaiNginxContainer  {
	return dag.
			Sai().
			Nginx(version, os).
			WithConfigTemplate(configTemplate)
}

container() 🔗

Returns the built Nginx container

Return Type
Container !
Example
func (m *myModule) example(version string, os string) *Container  {
	return dag.
			Sai().
			Nginx(version, os).
			Container()
}

Phpcontainer 🔗

withExtension() 🔗

Install a PHP extension into the container

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
extensionString !-No description provided
Example
func (m *myModule) example(container *Container, extension string) *SaiPhpcontainer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			WithExtension(extension)
}

withComposer() 🔗

Install composer into the container, useful if you need a container with composer in it, but to run composer commands see the composer() function.

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
composerVersionString !"2"No description provided
composerCacheNameString !"sai-composer-cache"No description provided
Example
func (m *myModule) example(container *Container, composerVersion string, composerCacheName string) *SaiPhpcontainer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			WithComposer(composerVersion, composerCacheName)
}

composer() 🔗

Returns a composer object which can operate with your container

Return Type
Composer !
Arguments
NameTypeDefault ValueDescription
composerVersionString !"2"No description provided
composerCacheNameString !"sai-composer-cache"No description provided
Example
func (m *myModule) example(container *Container, composerVersion string, composerCacheName string) *SaiComposer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			Composer(composerVersion, composerCacheName)
}

withAppCode() 🔗

Add application code to container

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
appCodeDirectory !-No description provided
pathString !"\/app"No description provided
Example
func (m *myModule) example(container *Container, appCode *Directory, path string) *SaiPhpcontainer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			WithAppCode(appCode, path)
}

withComposerApp() 🔗

Adds application code which uses composer to manage dependencies. Requires a composer.json in the root of the directory. Will do an install of the dependencies using Composer.

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
appCodeDirectory !-No description provided
pathString !"\/app"No description provided
composerVersionString !"2"No description provided
composerCacheNameString !"sai-composer-cache"No description provided
Example
func (m *myModule) example(container *Container, appCode *Directory, path string, composerVersion string, composerCacheName string) *SaiPhpcontainer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			WithComposerApp(appCode, path, composerVersion, composerCacheName)
}

container() 🔗

Returns the built PHP container

Return Type
Container !
Example
func (m *myModule) example(container *Container) *Container  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			Container()
}

Sai 🔗

php() 🔗

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
versionString !"8.3"No description provided
osString !"alpine"No description provided
variantString !"cli"No description provided
Example
func (m *myModule) example(version string, os string, variant string) *SaiPhpcontainer  {
	return dag.
			Sai().
			Php(version, os, variant)
}

adoptPhpcontainer() 🔗

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
containerContainer !-No description provided
Example
func (m *myModule) example(container *Container) *SaiPhpcontainer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container)
}

nginx() 🔗

Return Type
NginxContainer !
Arguments
NameTypeDefault ValueDescription
versionString !"1.27"No description provided
osString !"alpine"No description provided
variantString nullNo description provided
Example
func (m *myModule) example(version string, os string) *SaiNginxContainer  {
	return dag.
			Sai().
			Nginx(version, os)
}