Docs: update react-netlify example for new CLI

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes 2021-03-31 23:50:27 +00:00
parent 4dcddc68c3
commit 991d2f4e52

View File

@ -1,5 +1,33 @@
# Dagger Examples # Dagger Examples
All example commands should be executed in the `examples/` directory
in an up-to-date checkout of the [dagger repository](https://github.com/dagger/dagger).
## react-netlify: Deploy a React Web app to Netlify
This example shows how to deploy an example React Application to Netlify,
using Dagger.
1. Create a new deployment with the react-netlify deployment plan.
```sh
dagger new --name example-one --base-dir ./react-netlify
```
2. Configure the deployment with your Netlify access token.
You can create new tokens from the [Netlify dashboard](https://app.netlify.com/user/applications/personal).
```sh
dagger -d example-one input secret todoApp.account.token MY_TOKEN
```
3. You can deploy updates at any time
```sh
dagger -d example-one up
```
## aws-eks: Kubernetes on AWS (EKS) ## aws-eks: Kubernetes on AWS (EKS)
This example provisions a Kubernetes (EKS) cluster on AWS using Cloudformation, This example provisions a Kubernetes (EKS) cluster on AWS using Cloudformation,
@ -41,14 +69,3 @@ dagger compute ./kubernetes \
--input-string awsConfig.secretKey="MY_AWS_SECRET_KEY" \ --input-string awsConfig.secretKey="MY_AWS_SECRET_KEY" \
--input-dir helmChart.chart=./kubernetes/testdata/mychart --input-dir helmChart.chart=./kubernetes/testdata/mychart
``` ```
## react-netlify: Deploy a React Web app to Netlify
This example shows how to deploy a simple React App to Netlify.
How to run:
```sh
dagger compute ./react-netlify \
--input-string todoApp.account.token="MY_NETLIFY_API_TOKEN"
```