examples/jamstack: added support for frontend (netlify)

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba
2021-04-13 14:12:40 -07:00
parent c06f2aa55e
commit 3911c25803
3 changed files with 60 additions and 4 deletions

View File

@@ -3,9 +3,6 @@ package main
// Name of the application
name: string & =~"[a-z0-9-]+"
// FIXME: temporary workaround (GH issue #142) - image metadata is lost after build
backend: container: command: ["/bin/hello-go"]
// Inject db info in the container environment
backend: environment: {
DB_USERNAME: database.username
@@ -16,7 +13,10 @@ backend: environment: {
DB_TYPE: database.dbType
}
// Configure the frontend with the API URL
frontend: environment: APP_URL_API: url.backendURL
url: {
frontendURL: "FIXME"
frontendURL: frontend.site.url
backendURL: "https://\(backend.hostname)/"
}