Dagger
Search

caddy

Get a container or service running Caddy HTTP server to serve static content without TLS.

Installation

dagger install github.com/camptocamp/daggerverse/caddy@v0.2.2

Entrypoint

Return Type
Caddy !
Arguments
NameTypeDescription
directoryDirectory !Directory containing static content to serve
Example
dagger -m github.com/camptocamp/daggerverse/caddy@6bc348135849aab094c59cbe49a501ba9c625f9f call \
 --directory DIR_PATH
func (m *myModule) example(directory *Directory) *Caddy  {
	return dag.
			Caddy(directory)
}
@function
def example(directory: dagger.Directory) -> dag.Caddy:
	return (
		dag.caddy(directory)
	)
@func()
example(directory: Directory): Caddy {
	return dag
		.caddy(directory)
}

Types

Caddy 🔗

Caddy

container() 🔗

Get a Caddy container ready to serve the static content

Static content is mounted under /usr/share/caddy and container exposes port 8080.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
platformScalar -Platform to get container for
mountDirectoryBoolean -Mount the directory containing the static content instead of copying it.
Example
dagger -m github.com/camptocamp/daggerverse/caddy@6bc348135849aab094c59cbe49a501ba9c625f9f call \
 --directory DIR_PATH container
func (m *myModule) example(directory *Directory) *Container  {
	return dag.
			Caddy(directory).
			Container()
}
@function
def example(directory: dagger.Directory) -> dagger.Container:
	return (
		dag.caddy(directory)
		.container()
	)
@func()
example(directory: Directory): Container {
	return dag
		.caddy(directory)
		.container()
}

server() 🔗

Get a Caddy service serving the static content

See container() for details.

Return Type
Service !
Example
dagger -m github.com/camptocamp/daggerverse/caddy@6bc348135849aab094c59cbe49a501ba9c625f9f call \
 --directory DIR_PATH server
func (m *myModule) example(directory *Directory) *Service  {
	return dag.
			Caddy(directory).
			Server()
}
@function
def example(directory: dagger.Directory) -> dagger.Service:
	return (
		dag.caddy(directory)
		.server()
	)
@func()
example(directory: Directory): Service {
	return dag
		.caddy(directory)
		.server()
}