Skip to content

Instantly share code, notes, and snippets.

@linben
Created January 19, 2016 23:10
Show Gist options
  • Save linben/676fc325c5abc97c3950 to your computer and use it in GitHub Desktop.
Save linben/676fc325c5abc97c3950 to your computer and use it in GitHub Desktop.
{
"id": "department-a",
"apps": [
{
"id": "service-common",
"cpus": 0.1,
"mem": 32,
"ports": [0],
"cmd": "sleep 3 && python -m http.server 80",
"instances": 2,
"healthChecks": [
{
"protocol": "HTTP",
"path": "/",
"portIndex": 0,
"timeoutSeconds": 10,
"gracePeriodSeconds": 10,
"intervalSeconds": 2,
"maxConsecutiveFailures": 10
}
],
"container": {
"type": "DOCKER",
"docker": {
"image": "python:3",
"network": "BRIDGE",
"portMappings": [
{ "hostPort": 0, "containerPort": 80 }
]
}
}
}
],
"groups": [
{
"id" : "product-a",
"apps":[
{
"id": "service-a",
"cpus": 0.1,
"mem": 32,
"ports": [0],
"cmd": "sleep 3 && python -m http.server 80",
"instances": 2,
"healthChecks": [
{
"protocol": "HTTP",
"path": "/",
"portIndex": 0,
"timeoutSeconds": 10,
"gracePeriodSeconds": 10,
"intervalSeconds": 2,
"maxConsecutiveFailures": 10
}
],
"container": {
"type": "DOCKER",
"docker": {
"image": "python:3",
"network": "BRIDGE",
"portMappings": [
{ "hostPort": 0, "containerPort": 80 }
]
}
},
"dependencies": [
"/department-a/service-common"
]
},
{
"id": "service-b",
"cpus": 0.1,
"mem": 32,
"ports": [0],
"cmd": "sleep 3 && python -m http.server $PORT0",
"instances": 2,
"healthChecks": [
{
"protocol": "HTTP",
"path": "/",
"portIndex": 0,
"timeoutSeconds": 10,
"gracePeriodSeconds": 10,
"intervalSeconds": 2,
"maxConsecutiveFailures": 10
}
],
"container": {
"type": "DOCKER",
"docker": {
"image": "python:3",
"network": "HOST"
}
},
"dependencies": [
"/department-a/product-a/service-a"
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment