Dagger
Search

nginx

This module is still a work in progress and is not yet ready for production. You can use it to test your website locally but also run cypress tests in a dagger CI.

The module isn't designed for complex uses cases and is limited to a simple website.

Installation

dagger install github.com/quartz-technology/daggerverse/nginx@v0.0.3

Entrypoint

Return Type
Nginx !
Arguments
NameTypeDescription
sourceDirectory !No description provided
portInteger No description provided
versionString No description provided
configFile No description provided
Example
dagger -m github.com/quartz-technology/daggerverse/nginx@627fc4df7de8ce3bd8710fa08ea2db6cf16712b3 call \
 --source DIR_PATH
func (m *myModule) example(source *Directory) *Nginx  {
	return dag.
			Nginx(source)
}
@function
def example(source: dagger.Directory, ) -> dag.Nginx:
	return (
		dag.nginx(source)
	)
@func()
example(source: Directory, ): Nginx {
	return dag
		.nginx(source)
}

Types

Nginx 🔗

version() 🔗

Nginx version to use (default to 1.25.3)

Return Type
String !
Example
dagger -m github.com/quartz-technology/daggerverse/nginx@627fc4df7de8ce3bd8710fa08ea2db6cf16712b3 call \
 --source DIR_PATH version
func (m *myModule) example(ctx context.Context, source *Directory) string  {
	return dag.
			Nginx(source).
			Version(ctx)
}
@function
async def example(source: dagger.Directory, ) -> str:
	return await (
		dag.nginx(source)
		.version()
	)
@func()
async example(source: Directory, ): Promise<string> {
	return dag
		.nginx(source)
		.version()
}

source() 🔗

HTML source files

Return Type
Directory !
Example
dagger -m github.com/quartz-technology/daggerverse/nginx@627fc4df7de8ce3bd8710fa08ea2db6cf16712b3 call \
 --source DIR_PATH source
func (m *myModule) example(source *Directory) *Directory  {
	return dag.
			Nginx(source).
			Source()
}
@function
def example(source: dagger.Directory, ) -> dagger.Directory:
	return (
		dag.nginx(source)
		.source()
	)
@func()
example(source: Directory, ): Directory {
	return dag
		.nginx(source)
		.source()
}

config() 🔗

Nginx configuration that overrides the default

Return Type
File !
Example
dagger -m github.com/quartz-technology/daggerverse/nginx@627fc4df7de8ce3bd8710fa08ea2db6cf16712b3 call \
 --source DIR_PATH config
func (m *myModule) example(source *Directory) *File  {
	return dag.
			Nginx(source).
			Config()
}
@function
def example(source: dagger.Directory, ) -> dagger.File:
	return (
		dag.nginx(source)
		.config()
	)
@func()
example(source: Directory, ): File {
	return dag
		.nginx(source)
		.config()
}

port() 🔗

Port to expose the nginx on

Return Type
Integer !
Example
dagger -m github.com/quartz-technology/daggerverse/nginx@627fc4df7de8ce3bd8710fa08ea2db6cf16712b3 call \
 --source DIR_PATH port
func (m *myModule) example(ctx context.Context, source *Directory) int  {
	return dag.
			Nginx(source).
			Port(ctx)
}
@function
async def example(source: dagger.Directory, ) -> int:
	return await (
		dag.nginx(source)
		.port()
	)
@func()
async example(source: Directory, ): Promise<number> {
	return dag
		.nginx(source)
		.port()
}

expose() 🔗

Expose the nginx server

Return Type
Service !
Example
dagger -m github.com/quartz-technology/daggerverse/nginx@627fc4df7de8ce3bd8710fa08ea2db6cf16712b3 call \
 --source DIR_PATH expose
func (m *myModule) example(source *Directory) *Service  {
	return dag.
			Nginx(source).
			Expose()
}
@function
def example(source: dagger.Directory, ) -> dagger.Service:
	return (
		dag.nginx(source)
		.expose()
	)
@func()
example(source: Directory, ): Service {
	return dag
		.nginx(source)
		.expose()
}