2022-08-13 18:20:59 -04:00
|
|
|
# nginx deployment
|
2019-03-07 18:03:51 +01:00
|
|
|
|
2022-08-13 18:20:59 -04:00
|
|
|
A simple example creating an nginx docker image and deployment.
|
2019-03-07 18:03:51 +01:00
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
2019-03-07 23:24:28 +01:00
|
|
|
### Building and applying kubernetes configuration
|
2019-03-07 18:03:51 +01:00
|
|
|
|
2022-08-13 18:20:59 -04:00
|
|
|
nix eval -f ./. --json result | kubectl apply -f -
|
2019-03-07 18:03:51 +01:00
|
|
|
|
|
|
|
|
### Building and pushing docker images
|
|
|
|
|
|
2022-08-13 18:20:59 -04:00
|
|
|
nix run -f ./. pushDockerImages -c copy-docker-images
|
2019-03-07 23:24:28 +01:00
|
|
|
|
|
|
|
|
### Running tests
|
|
|
|
|
|
2022-08-13 18:20:59 -04:00
|
|
|
Test will spawn vm with Kubernetes and run test script, which checks if everything
|
2019-03-07 23:24:28 +01:00
|
|
|
works as expected.
|
|
|
|
|
|
2022-08-13 18:20:59 -04:00
|
|
|
nix build -f ./. test-script
|
|
|
|
|
cat result | jq '.'
|