examples/jamstack: use a inputs.yaml instead of cue code
Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"dagger.io/git"
|
||||
)
|
||||
|
||||
name: "my-app"
|
||||
|
||||
// DISCLAIMER: all values below are fake and are provided as examples
|
||||
|
||||
infra: {
|
||||
awsConfig: {
|
||||
accessKey: "<REPLACE WITH AWS ACCESS KEY>"
|
||||
secretKey: "<REPLACE WITH AWS SECRET KEY>"
|
||||
region: "us-east-1"
|
||||
}
|
||||
vpcId: "vpc-020ctgv0bcde4242"
|
||||
ecrRepository: "8563296674124.dkr.ecr.us-east-1.amazonaws.com/apps"
|
||||
ecsClusterName: "bl-ecs-acme-764-ECSCluster-lRIVVg09G4HX"
|
||||
elbListenerArn: "arn:aws:elasticloadbalancing:us-east-1:8563296674124:listener/app/bl-ec-ECSAL-OSYI03K07BCO/3c2d3e78347bde5b/d02ac88cc007e24e"
|
||||
rdsAdminSecretArn: "arn:aws:secretsmanager:us-east-1:8563296674124:secret:AdminPassword-NQbBi7oU4CYS9-IGgS3B"
|
||||
rdsInstanceArn: "arn:aws:rds:us-east-1:8563296674124:cluster:bl-rds-acme-764-rdscluster-8eg3xbfjggkfdg"
|
||||
netlifyAccount: token: "<REPLACE WITH NETLIFY TOKEN>"
|
||||
}
|
||||
|
||||
database: dbType: "mysql"
|
||||
|
||||
backend: {
|
||||
source: git.#Repository & {
|
||||
remote: "https://github.com/blocklayerhq/acme-clothing.git"
|
||||
ref: "HEAD"
|
||||
subdir: "./crate/code/api"
|
||||
}
|
||||
|
||||
// DNS needs to be already configured to the ALB load-balancer
|
||||
// and a valid certificate needs to be configured for that listener
|
||||
hostname: "\(name).acme-764-api.microstaging.io"
|
||||
|
||||
container: {
|
||||
healthCheckPath: "/health-check"
|
||||
healthCheckTimeout: 40
|
||||
}
|
||||
}
|
||||
|
||||
frontend: {
|
||||
source: git.#Repository & {
|
||||
remote: "https://github.com/blocklayerhq/acme-clothing.git"
|
||||
ref: "HEAD"
|
||||
subdir: "./crate/code/web"
|
||||
}
|
||||
|
||||
writeEnvFile: ".env"
|
||||
|
||||
yarn: {
|
||||
buildDir: "public"
|
||||
script: "build:client"
|
||||
}
|
||||
}
|
@@ -3,12 +3,13 @@ package main
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/aws/ecs"
|
||||
"dagger.io/git"
|
||||
)
|
||||
|
||||
// Backend configuration
|
||||
backend: {
|
||||
// Source code to build this container
|
||||
source: dagger.#Artifact
|
||||
source: git.#Repository | dagger.#Artifact
|
||||
|
||||
// Container environment variables
|
||||
environment: [string]: string
|
||||
|
@@ -4,11 +4,12 @@ import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/netlify"
|
||||
"dagger.io/js/react"
|
||||
"dagger.io/git"
|
||||
)
|
||||
|
||||
frontend: {
|
||||
// Source code to build the app
|
||||
source: dagger.#Artifact
|
||||
source: git.#Repository | dagger.#Artifact
|
||||
|
||||
writeEnvFile?: string
|
||||
|
||||
|
34
examples/jamstack/inputs.yaml
Normal file
34
examples/jamstack/inputs.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
name: my-app
|
||||
infra:
|
||||
awsConfig:
|
||||
accessKey: <REPLACE WITH AWS ACCESS KEY>
|
||||
secretKey: <REPLACE WITH AWS SECRET KEY>
|
||||
region: us-east-1
|
||||
vpcId: vpc-020ctgv0bcde4242
|
||||
ecrRepository: 8563296674124.dkr.ecr.us-east-1.amazonaws.com/apps
|
||||
ecsClusterName: bl-ecs-acme-764-ECSCluster-lRIVVg09G4HX
|
||||
elbListenerArn: arn:aws:elasticloadbalancing:us-east-1:8563296674124:listener/app/bl-ec-ECSAL-OSYI03K07BCO/3c2d3e78347bde5b/d02ac88cc007e24e
|
||||
rdsAdminSecretArn: arn:aws:secretsmanager:us-east-1:8563296674124:secret:AdminPassword-NQbBi7oU4CYS9-IGgS3B
|
||||
rdsInstanceArn: arn:aws:rds:us-east-1:8563296674124:cluster:bl-rds-acme-764-rdscluster-8eg3xbfjggkfdg
|
||||
netlifyAccount:
|
||||
token: <REPLACE WITH NETLIFY TOKEN>
|
||||
database:
|
||||
dbType: mysql
|
||||
backend:
|
||||
source:
|
||||
remote: https://github.com/blocklayerhq/acme-clothing.git
|
||||
ref: HEAD
|
||||
subdir: ./crate/code/api
|
||||
hostname: my-app.acme-764-api.microstaging.io
|
||||
container:
|
||||
healthCheckPath: /health-check
|
||||
healthCheckTimeout: 40
|
||||
frontend:
|
||||
source:
|
||||
remote: https://github.com/blocklayerhq/acme-clothing.git
|
||||
ref: HEAD
|
||||
subdir: ./crate/code/web
|
||||
writeEnvFile: .env
|
||||
yarn:
|
||||
buildDir: public
|
||||
script: build:client
|
Reference in New Issue
Block a user