This is a Kurtosis package that starts an Nginx container.
If you have Kurtosis installed, run:
kurtosis run github.com/kurtosis-tech/nginx-package
If you don't have Kurtosis installed, click here to run this package on the Kurtosis playground.
To blow away the created enclave, run kurtosis clean -a
.
Running this package will return a Service
object representing the NginX service that was added. The service has one port available, with port name http
.
Click to see configuration
You can configure this package using the JSON structure below. The default values for each parameter are shown.
NOTE: the //
lines are not valid JSON; you will need to remove them!
{
// The name of the service that will be added
"name": "nginx",
// The image that will be started
"image": "nginx:latest",
// The name of a files artifact (https://docs.kurtosis.com/concepts-reference/files-artifacts) containing one
// or more Nginx .conf files (https://docs.nginx.com/nginx/admin-guide/basic-functionality/managing-configuration-files/), for
// example nginx.conf
// If not supplied, no custom configuration will be loaded
"config_files_artifact": ""
}
The arguments can then be passed in to kurtosis run
.
For example:
kurtosis run github.com/kurtosis-tech/nginx-package '{"name":"Maynard James Keenan"}'
You can also store the JSON args in a file, and use command expansion to slot them in:
kurtosis run github.com/kurtosis-tech/nginx-package "$(cat args.json)"
Kurtosis packages can be composed inside other Kurtosis packages. To use this package in your package:
First, import this package by adding the following to the top of your Starlark file:
this_package = import_module("github.com/kurtosis-tech/nginx-package/main.star")
Then, call the this package's run
function somewhere in your Starlark script:
this_package_output = this_package.run(plan, args)
- Install Kurtosis
- Clone this repo
- For your dev loop, run
kurtosis clean -a && kurtosis run .
inside the repo directory