diff --git a/examples/jamstack/backend.cue b/examples/jamstack/backend.cue index 4932502f..200d389c 100644 --- a/examples/jamstack/backend.cue +++ b/examples/jamstack/backend.cue @@ -9,40 +9,46 @@ import ( // Backend configuration backend: { // Source code to build this container - source: git.#Repository | dagger.#Artifact + source: git.#Repository | dagger.#Artifact @dagger(input) // Container environment variables - environment: [string]: string + environment: { + [string]: string @dagger(input) + } // Public hostname (need to match the master domain configures on the loadbalancer) - hostname: string + hostname: string @dagger(input) // Container configuration container: { // Desired number of running containers - desiredCount: *1 | int + desiredCount: *1 | int @dagger(input) // Time to wait for the HTTP timeout to complete - healthCheckTimeout: *10 | int + healthCheckTimeout: *10 | int @dagger(input) // HTTP Path to perform the healthcheck request (HTTP Get) - healthCheckPath: *"/" | string + healthCheckPath: *"/" | string @dagger(input) // Number of times the health check needs to fail before recycling the container - healthCheckUnhealthyThreshold: *2 | int + healthCheckUnhealthyThreshold: *2 | int @dagger(input) // Port used by the process inside the container - port: *80 | int + port: *80 | int @dagger(input) // Memory to allocate - memory: *1024 | int + memory: *1024 | int @dagger(input) // Override the default container command - command: [...string] + command: [...string] @dagger(input) // Custom dockerfile path - dockerfilePath: *"" | string + dockerfilePath: *"" | string @dagger(input) // docker build args - dockerBuildArgs: [string]: string + dockerBuildArgs: { + [string]: string @dagger(input) + } } // Init container runs only once when the main container starts initContainer: { - command: [...string] - environment: [string]: string + command: [...string] @dagger(input) + environment: { + [string]: string @dagger(input) + } } } diff --git a/examples/jamstack/database.cue b/examples/jamstack/database.cue index a2ed656e..ab3f470b 100644 --- a/examples/jamstack/database.cue +++ b/examples/jamstack/database.cue @@ -7,7 +7,7 @@ import ( database: { let slug = name - dbType: "mysql" | "postgresql" + dbType: "mysql" | "postgresql" @dagger(input) db: rds.#CreateDB & { config: infra.awsConfig diff --git a/examples/jamstack/frontend.cue b/examples/jamstack/frontend.cue index fe96e014..d6596e6a 100644 --- a/examples/jamstack/frontend.cue +++ b/examples/jamstack/frontend.cue @@ -9,24 +9,30 @@ import ( frontend: { // Source code to build the app - source: git.#Repository | dagger.#Artifact + source: git.#Repository | dagger.#Artifact @dagger(input) - writeEnvFile?: string + writeEnvFile?: string @dagger(input) // Yarn Build yarn: { // Run this yarn script - script: string | *"build" + script: string | *"build" @dagger(input) // Read build output from this directory // (path must be relative to working directory). - buildDir: string | *"build" + buildDir: string | *"build" @dagger(input) } // Build environment variables - environment: [string]: string - environment: NODE_ENV: string | *"production" - environment: APP_URL: "https://\(name).netlify.app/" + environment: { + [string]: string @dagger(input) + } + environment: { + NODE_ENV: string | *"production" @dagger(input) + } + environment: { + APP_URL: "https://\(name).netlify.app/" @dagger(input) + } } frontend: { diff --git a/examples/jamstack/infra.cue b/examples/jamstack/infra.cue index 9b04eccc..db076093 100644 --- a/examples/jamstack/infra.cue +++ b/examples/jamstack/infra.cue @@ -10,26 +10,26 @@ infra: { awsConfig: aws.#Config // VPC Id - vpcId: string + vpcId: string @dagger(input) // ECR Image repository - ecrRepository: string + ecrRepository: string @dagger(input) // ECS cluster name - ecsClusterName: string + ecsClusterName: string @dagger(input) // Execution Role ARN used for all tasks running on the cluster - ecsTaskRoleArn?: string + ecsTaskRoleArn?: string @dagger(input) // ELB listener ARN - elbListenerArn: string + elbListenerArn: string @dagger(input) // Secret ARN for the admin password of the RDS Instance - rdsAdminSecretArn: string + rdsAdminSecretArn: string @dagger(input) // ARN of the RDS Instance - rdsInstanceArn: string + rdsInstanceArn: string @dagger(input) // Netlify credentials - netlifyAccount: netlify.#Account + netlifyAccount: netlify.#Account @dagger(input) } diff --git a/examples/jamstack/main.cue b/examples/jamstack/main.cue index e9e4d2ab..05b40ef1 100644 --- a/examples/jamstack/main.cue +++ b/examples/jamstack/main.cue @@ -1,7 +1,7 @@ package main // Name of the application -name: string & =~"[a-z0-9-]+" +name: string & =~"[a-z0-9-]+" @dagger(input) // Inject db info in the container environment backend: environment: { @@ -17,6 +17,6 @@ backend: environment: { frontend: environment: APP_URL_API: url.backendURL url: { - frontendURL: frontend.site.url - backendURL: "https://\(backend.hostname)/" + frontendURL: frontend.site.url @dagger(output) + backendURL: "https://\(backend.hostname)/" @dagger(output) } diff --git a/examples/monitoring/main.cue b/examples/monitoring/main.cue index 1021cdbf..49469f2d 100644 --- a/examples/monitoring/main.cue +++ b/examples/monitoring/main.cue @@ -6,14 +6,14 @@ import ( // AWS account: credentials and region awsConfig: aws.#Config & { - region: *"us-east-1" | string + region: *"us-east-1" | string @dagger(input) } // URL of the website to monitor -website: string | *"https://www.google.com" +website: string | *"https://www.google.com" @dagger(input) // Email address to notify of monitoring alerts -email: string +email: string @dagger(input) // The monitoring service running on AWS Cloudwatch monitor: #HTTPMonitor & { diff --git a/examples/react/main.cue b/examples/react/main.cue index 1e4cb1df..44c60c9e 100644 --- a/examples/react/main.cue +++ b/examples/react/main.cue @@ -15,7 +15,7 @@ repo: git.#Repository & { // Host the application with Netlify www: netlify.#Site & { // Site name can be overridden - name: string | *"dagger-examples-react" + name: string | *"dagger-examples-react" @dagger(input) // Deploy the output of yarn build // (Netlify build feature is not used, to avoid extra cost).