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.1.0

Entrypoint

Return Type
Caddy !
Arguments
NameTypeDescription
directoryDirectory !Directory containing static content to serve
Example
dagger -m github.com/camptocamp/daggerverse/caddy@708a2b0b6e80306a502f354b6b8c470a1594fd33 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 !
Example
dagger -m github.com/camptocamp/daggerverse/caddy@708a2b0b6e80306a502f354b6b8c470a1594fd33 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@708a2b0b6e80306a502f354b6b8c470a1594fd33 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()
}