This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/examples/jamstack/main.cue
Sam Alba 3911c25803 examples/jamstack: added support for frontend (netlify)
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-13 14:13:11 -07:00

23 lines
516 B
CUE

package main
// Name of the application
name: string & =~"[a-z0-9-]+"
// Inject db info in the container environment
backend: environment: {
DB_USERNAME: database.username
DB_HOSTNAME: database.hostname
DB_PASSWORD: database.password
DB_DBNAME: database.dbName
DB_PORT: "\(database.port)"
DB_TYPE: database.dbType
}
// Configure the frontend with the API URL
frontend: environment: APP_URL_API: url.backendURL
url: {
frontendURL: frontend.site.url
backendURL: "https://\(backend.hostname)/"
}