nextjsBuild
The module is implemented as a struct NextjsBuild with a method Build that takes a source directory (source) as input, representing the root of the Next.js project.The resulting container is configured for serving the static site, with Nginx acting as the web server.
Installation
dagger install github.com/slumbering/daggerverse/nextjs-build@1f017e3d5f0846ed9e7a734476a1fd0dfd290c20Entrypoint
Return Type
NextjsBuild Example
dagger -m github.com/slumbering/daggerverse/nextjs-build@1f017e3d5f0846ed9e7a734476a1fd0dfd290c20 call \
func (m *MyModule) Example() *dagger.NextjsBuild {
return dag.
NextjsBuild()
}@function
def example() -> dagger.NextjsBuild:
return (
dag.nextjs_build()
)@func()
example(): NextjsBuild {
return dag
.nextjsBuild()
}Types
NextjsBuild 🔗
build() 🔗
Build initiates the construction process of a Next.js application within a containerized environment. This method takes a source directory (source) as input, representing the root of the Next.js project. The resulting container is configured for serving the static site, with Nginx acting as the web server.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
Example
dagger -m github.com/slumbering/daggerverse/nextjs-build@1f017e3d5f0846ed9e7a734476a1fd0dfd290c20 call \
build --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container {
return dag.
NextjsBuild().
Build(source)
}@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.nextjs_build()
.build(source)
)@func()
example(source: Directory): Container {
return dag
.nextjsBuild()
.build(source)
}