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.3
Entrypoint
Return Type
Caddy !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
directory | Directory ! | - | Directory containing static content to serve |
Example
dagger -m github.com/camptocamp/daggerverse/caddy@38a0529e1bf228e38c84b2565e1265d2487b160c 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
Name | Type | Default Value | Description |
---|---|---|---|
platform | Scalar | - | Platform to get container for |
mountDirectory | Boolean | - | Mount the directory containing the static content instead of copying it. |
Example
dagger -m github.com/camptocamp/daggerverse/caddy@38a0529e1bf228e38c84b2565e1265d2487b160c 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@38a0529e1bf228e38c84b2565e1265d2487b160c 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()
}