diff --git a/app.bicep b/app.bicep index 4cd1bd6..98aae84 100644 --- a/app.bicep +++ b/app.bicep @@ -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 + } +}