Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 13 additions & 84 deletions app.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -65,94 +65,23 @@ resource backend 'Applications.Core/containers@2023-10-01-preview' = {
containerPort: port
path: '/healthz'
}}
// connections: {
// database: {
// source: database.id
//
// }
//}
connections: {
database: {
source: database.id

}
}
}
}



// import radius as radius

// @description('The Radius environment ID')
// param environment string

// @description('The Radius application name')
// param appName string = 'prototype-app'

// // Application definition
// resource app 'Applications.Core/applications@2023-10-01-preview' = {
// name: appName
// properties: {
// environment: environment
// }
// }

// // Frontend container - serves the web UI
// resource frontend 'Applications.Core/containers@2023-10-01-preview' = {
// name: 'frontend'
// properties: {
// application: app.id
// container: {
// image: 'nginx:alpine'
// ports: {
// web: {
// containerPort: 80
// protocol: 'TCP'
// }
// }
// env: {
// BACKEND_URL: {
// value: 'http://backend:3000'
// }
// }
// }
// connections: {
// backend: {
// source: 'http://backend:3000'
// }
// }
// }
// }

// // Backend container - handles API requests
// resource backend 'Applications.Core/containers@2023-10-01-preview' = {
// name: 'backend'
// properties: {
// application: app.id
// container: {
// image: 'node:18-alpine'
// ports: {
// api: {
// containerPort: 3000
// protocol: 'TCP'
// }
// }
// env: {
// DB_CONNECTION: {
// value: database.connectionString()
// }
// PORT: {
// value: '3000'
// }
// }
// }
// connections: {
// database: {
// source: database.id
// }
// }
// }
// }

// Database - Redis used as a simple data store
// resource database 'Applications.Datastores/redisCaches@2023-10-01-preview' = {
// name: 'database'
// properties: {
// application: app.id
// environment: environment
// }
resource database 'Applications.Datastores/redisCaches@2023-10-01-preview' = {
name: 'database'
properties: {
application: app.id
environment: environment
}
}