docs: move plan out of cue.mod
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
@@ -68,7 +68,7 @@ Although not strictly necessary, for an optimal development experience, we recom
|
||||
|
||||
If you are new to Cue, we recommend keeping the following resources in browser tabs:
|
||||
|
||||
- The unofficial but excellent [Cuetorials](https://cuetorials.com/overview/foundations/) in a browser tab, to look up Cue concepts as they appear.
|
||||
The unofficial but excellent [Cuetorials](https://cuetorials.com/overview/foundations/) in a browser tab, to look up Cue concepts as they appear.
|
||||
|
||||
- The official [Cue interactive sandbox](https://cuelang.org/play) for easy experimentation.
|
||||
|
||||
@@ -116,7 +116,7 @@ But you can call your packages anything you want.
|
||||
Let's create a new directory for our Cue package:
|
||||
|
||||
```shell
|
||||
mkdir cue.mod/multibucket
|
||||
mkdir multibucket
|
||||
```
|
||||
|
||||
### Component 1: app source code
|
||||
@@ -130,7 +130,7 @@ In Dagger terms, this component has two essential properties:
|
||||
|
||||
Let's write the corresponding Cue code to a new file in our package:
|
||||
|
||||
```cue title="todoapp/cue.mod/multibucket/source.cue"
|
||||
```cue title="todoapp/multibucket/source.cue"
|
||||
package multibucket
|
||||
|
||||
import (
|
||||
@@ -141,13 +141,13 @@ import (
|
||||
src: dagger.#Artifact & dagger.#Input
|
||||
```
|
||||
|
||||
This code defines a component at the key `src`, and specifies that it is both an artifact and an input.
|
||||
This code defines a component at the key `src` and specifies that it is both an artifact and an input.
|
||||
|
||||
### Component 2: yarn package
|
||||
|
||||
The second component of our plan is the Yarn package built from the app source code:
|
||||
|
||||
```cue title="todoapp/cue.mod/multibucket/yarn.cue"
|
||||
```cue title="todoapp/multibucket/yarn.cue"
|
||||
package multibucket
|
||||
|
||||
import (
|
||||
@@ -176,7 +176,7 @@ _FIXME_: this section is not yet available because the [Amazon S3 package](https
|
||||
|
||||
The third component of our plan is the Netlify site to which the app will be deployed:
|
||||
|
||||
```cue title="todoapp/cue.mod/multibucket/netlify.cue"
|
||||
```cue title="todoapp/multibucket/netlify.cue"
|
||||
package multibucket
|
||||
|
||||
import (
|
||||
@@ -216,7 +216,7 @@ You can also browse the [Dagger Universe](../reference/universe/README.md) refer
|
||||
Now that your Cue package is ready, let's create an environment to run it:
|
||||
|
||||
```shell
|
||||
dagger new 'multibucket' -m cue.mod/multibucket
|
||||
dagger new 'multibucket' -m multibucket
|
||||
```
|
||||
|
||||
### Configure user inputs
|
||||
@@ -244,7 +244,7 @@ All the values without default values (without `*`) have to be specified by the
|
||||
- `site.netlify.name`, name of the published website
|
||||
- `src`, source code of the app
|
||||
|
||||
Please note the type of the user inputs: a string, a #Secret and an artifact. Let's see how to input them:
|
||||
Please note the type of the user inputs: a string, a #Secret, and an artifact. Let's see how to input them:
|
||||
|
||||
```shell
|
||||
# As a string input is expected for `site.netlify.name`, we set a `text` input
|
||||
@@ -253,21 +253,19 @@ dagger input text site.netlify.name <GLOBALLY-UNIQUE-NAME> -e multibucket
|
||||
# As a secret input is expected for `site.netlify.account.token`, we set a `secret` input
|
||||
dagger input secret site.netlify.account.token <PERSONAL-ACCESS-TOKEN> -e multibucket
|
||||
|
||||
# As an Artifact is exepected for `src`, we set a `dir` input (dagger input list for alternatives)
|
||||
# As an Artifact is expected for `src`, we set a `dir` input (dagger input list for alternatives)
|
||||
dagger input dir src . -e multibucket
|
||||
|
||||
```
|
||||
|
||||
### Deploy
|
||||
|
||||
Now that everything is properly set, let's deploy on Netlify:
|
||||
Now that everything is appropriately set, let's deploy on Netlify:
|
||||
|
||||
```shell
|
||||
dagger up -e multibucket
|
||||
```
|
||||
|
||||
[This section is not yet written](https://github.com/dagger/dagger/blob/main/CONTRIBUTING.md)
|
||||
|
||||
### Using the environment
|
||||
|
||||
[This section is not yet written](https://github.com/dagger/dagger/blob/main/CONTRIBUTING.md)
|
||||
|
Reference in New Issue
Block a user