-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: jasonviviano <[email protected]>
- Loading branch information
1 parent
b394b43
commit f8784a4
Showing
3 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,3 +53,4 @@ resource portableRedis 'Applications.Datastores/redisCaches@2023-10-01-preview' | |
} | ||
} | ||
//MANUAL | ||
|
62 changes: 62 additions & 0 deletions
62
...r-apps/portable-resources/howto-author-portable-resources/snippets/app-redis-recipe.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import radius as radius | ||
|
||
@description('Specifies the environment for resources.') | ||
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' | ||
properties: { | ||
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: { | ||
source: recipeRedis.id | ||
} | ||
} | ||
} | ||
} | ||
//CONTAINER | ||
|
||
//Recipe | ||
resource recipeRedis 'Applications.Datastores/redisCaches@2023-10-01-preview'= { | ||
name: 'myresource' | ||
properties: { | ||
environment: environment | ||
application: application | ||
} | ||
} | ||
//Recipe | ||
|
||
//RecipeSpecified | ||
resource redis 'Applications.Datastores/redisCaches@2023-10-01-preview'= { | ||
name: 'myresource' | ||
properties: { | ||
environment: environment | ||
application: application | ||
recipe: { | ||
name: 'azure-prod' | ||
} | ||
} | ||
} | ||
//RecipeSpecified | ||
|