Skip to content

Instantly share code, notes, and snippets.

@andrewmatveychuk
Created June 25, 2025 15:06
Show Gist options
  • Select an option

  • Save andrewmatveychuk/3340bd04b82fb3339a7d0367f27b8074 to your computer and use it in GitHub Desktop.

Select an option

Save andrewmatveychuk/3340bd04b82fb3339a7d0367f27b8074 to your computer and use it in GitHub Desktop.
A basic WordPress application definition on Radius platform
extension radius
extension radiusResources
@description('The Radius Application ID. Injected automatically by the rad CLI.')
param application string
@description('The env ID of your Radius Environment. Set automatically by the rad CLI.')
param environment string
@description('Tag to pull for the WordPress container image.')
param tag string = 'latest'
var port int = 80
resource frontend 'Applications.Core/containers@2023-10-01-preview' = {
name: 'wordpress'
properties: {
application: application
environment: environment
container: {
image: 'wordpress:${tag}'
ports: {
web: {
containerPort: port
}
}
env: {
WORDPRESS_DB_HOST: {
value: '${database.properties.host}:${database.properties.port}'
}
WORDPRESS_DB_USER: {
value: database.properties.user
}
WORDPRESS_DB_PASSWORD: {
value: database.properties.password
}
WORDPRESS_DB_NAME: {
value: database.properties.database
}
}
}
connections: {
database: {
source: database.id
}
}
}
}
resource database 'Radius.Resources/mySQL@2023-10-01-preview' = {
name: 'mysql'
properties: {
application: application
environment: environment
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment