Dagger
Search

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@8cf87d4706ae52b24cd91812119ae947e17d97d7

Entrypoint

Return Type
NextjsBuild
Example
dagger -m github.com/slumbering/daggerverse/nextjs-build@8cf87d4706ae52b24cd91812119ae947e17d97d7 call \
func (m *myModule) example() *NextjsBuild  {
	return dag.
			NextjsBuild()
}
@function
def example() -> dag.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.

Parameters: - ctx: A context.Context to provide control over the execution lifetime and cancellations. - source: A pointer to a Directory representing the Next.js project’s source directory.

Returns: - *Container: A pointer to a Container configured to serve the built Next.js application using Nginx, ready for deployment.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
Example
dagger -m github.com/slumbering/daggerverse/nextjs-build@8cf87d4706ae52b24cd91812119ae947e17d97d7 call \
 build --source DIR_PATH
func (m *myModule) example(source *Directory) *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)
}