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.2
Entrypoint
Return Type
Caddy !
Arguments
Name | Type | Description |
---|---|---|
directory | Directory ! | Directory containing static content to serve |
Example
dagger -m github.com/camptocamp/daggerverse/caddy@b6ab05a1c5d9498faeabf0ca83511be50dd9036f 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@b6ab05a1c5d9498faeabf0ca83511be50dd9036f 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@b6ab05a1c5d9498faeabf0ca83511be50dd9036f 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()
}