diff --git a/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/index.md b/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/index.md index 10bb08d2f..e810c29e3 100644 --- a/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/index.md +++ b/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/index.md @@ -49,14 +49,13 @@ Refer to the [Redis resource schema]({{< ref "reference/resource-schema/cache/re In your Bicep file `app.bicep`, add a container resource that will be leveraged by your portable resource later: -{{< rad file="snippets/app.bicep" embed=true marker="//EMPTYCONTAINER" >}} +{{< rad file="snippets/app.bicep" embed=true >}} ## Step 3: Access your portable resources You can access the portable resource via [`connections`]({{< ref "guides/author-apps/containers#connections" >}}). Update your container definition to add a connection to the new Redis cache. This results in environment variables for connection information automatically set on the container. - -{{< rad file="snippets/app-redis-manual.bicep" embed=true marker="//CONTAINER" markdownConfig="{linenos=table,hl_lines=[\"19-22\"]}">}} +{{< rad file="snippets/app-redis-manual.bicep" embed=true >}} ## Step 4: Deploy your app diff --git a/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/snippets/app-redis-manual.bicep b/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/snippets/app-redis-manual.bicep index 41e61ed82..ce8018f7f 100644 --- a/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/snippets/app-redis-manual.bicep +++ b/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/snippets/app-redis-manual.bicep @@ -6,9 +6,6 @@ param environment string @description('Specifies the application for resources.') param application string -@description('Specifies the namespace for resources.') -param namespace string - //CONTAINER resource container 'Applications.Core/containers@2023-10-01-preview' = { name: 'demo' diff --git a/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/snippets/app.bicep b/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/snippets/app.bicep index e3f05ea49..7bbff7199 100644 --- a/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/snippets/app.bicep +++ b/docs/content/guides/author-apps/portable-resources/howto-author-portable-resources/snippets/app.bicep @@ -10,6 +10,22 @@ resource container 'Applications.Core/containers@2023-10-01-preview' = { application: application container: { image: 'ghcr.io/radius-project/samples/demo:latest' + ports: { + web: { + containerPort: 3000 + } + } + livenessProbe: { + kind: 'httpGet' + containerPort: 3000 + path: '/healthz' + initialDelaySeconds: 10 + } + } + connections: { + redis: { + //... + } } } }