Skip to content

Instantly share code, notes, and snippets.

@apcera-code
Created September 13, 2016 20:54
Show Gist options
  • Save apcera-code/5e7fbf8ba954904469585eccde008265 to your computer and use it in GitHub Desktop.
Save apcera-code/5e7fbf8ba954904469585eccde008265 to your computer and use it in GitHub Desktop.
Using Apcea’s MRM it is possible to deploy a fully functioning Wordpress application and securely connect it to a new or existing MySql Database with a single deployment command that can be repeated time and time again in different contexts.
```json
{
"jobs": {
"job::/sandbox/dean::dockerwp": {
"docker": {
"image": "wordpress:latest"
},
"services" : {
"mysql-dockerwp" : {
"fqn" : "service::/sandbox/dean::mysql-dockerwp"
}
},
"exposed_ports": [
80
],
"routes": [
{
"config": {
"/*": [
{
"port": 80
}
]
},
"endpoint": "auto",
"type": "http"
}
],
"state" : "started",
"env" : {
"WORDPRESS_DB_HOST" : "{{(binding_service \"mysql-dockerwp\").URI.Host}}:{{(binding_service \"mysql-dockerwp\").URI.Port}}",
"WORDPRESS_DB_USER" : "{{(binding_service \"mysql-dockerwp\").URI.User}}",
"WORDPRESS_DB_PASSWORD" : "{{(binding_service \"mysql-dockerwp\").URI.Password}}",
"WORDPRESS_DB_NAME" : "{{(binding_service \"mysql-dockerwp\").URI.TrimmedPath}}"
}
}
},
"services" : {
"service::/sandbox/dean::mysql-dockerwp" : {
"type" : "mysql",
"name" : "mysql-dockerwp",
"provider_fqn" : "provider::/apcera/providers::mysql"
}
}
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment