Created
November 19, 2014 13:35
-
-
Save sttts/dd8f4472f8b7eb3f9607 to your computer and use it in GitHub Desktop.
Application Group in Marathon JSON
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
{ | |
"id": "/my-app", | |
"groups": [{ | |
"id": "databases", | |
"apps": [{ | |
"id": "redis", | |
"container": { | |
"type": "DOCKER", | |
"docker": { | |
"image": "dockerfile/redis", | |
"network": "BRIDGE", | |
"portMappings": [ | |
{ "containerPort": 6379, "hostPort": "4711", "protocol": "tcp"} | |
] | |
} | |
}, | |
"cmd": "redis-server /etc/redis/redis.conf --requirepass foo", | |
"env": { | |
}, | |
"cpus": 0.2, | |
"mem": 128.0, | |
"instances": 1, | |
"healthChecks": [{ | |
"protocol": "COMMAND", | |
"command": { "value": "redis-cli -h $HOST -p $PORT0 -a $REDIS_PASSWORD -n 1 PING | grep PONG " }, | |
"gracePeriodSeconds": 10, | |
"intervalSeconds": 10, | |
"portIndex": 0, | |
"timeoutSeconds": 10, | |
"maxConsecutiveFailures": 3 | |
}] | |
}] | |
},{ | |
"id": "services", | |
"dependencies": ["../databases"], | |
"apps": [{ | |
"id": "backend", | |
"container": { | |
"type": "DOCKER", | |
"docker": { | |
"image": "backend", | |
"network": "BRIDGE", | |
"portMappings": [ | |
{ "containerPort": 8080, "protocol": "tcp"} | |
] | |
} | |
}, | |
"env": { | |
}, | |
"cpus": 2, | |
"mem": 512, | |
"instances": 10, | |
"healthChecks": [{ | |
"protocol": "COMMAND", | |
"command": { "value": "curl -f -X GET http://$HOST:$PORT0/health" }, | |
"path": "/health", | |
"gracePeriodSeconds": 10, | |
"intervalSeconds": 10, | |
"portIndex": 0, | |
"timeoutSeconds": 10, | |
"maxConsecutiveFailures": 3 | |
}], | |
"minimumHealthCapacity": 0.6 | |
}, { | |
"id": "worker", | |
"container": { | |
"type": "DOCKER", | |
"docker": { | |
"image": "worker", | |
"network": "BRIDGE" | |
} | |
}, | |
"env": { | |
}, | |
"cpus": 0.1, | |
"mem": 256.0, | |
"instances": 8, | |
"minimumHealthCapacity": 0.5 | |
}, { | |
"id": "beat", | |
"container": { | |
"type": "DOCKER", | |
"docker": { | |
"image": "beat", | |
"network": "BRIDGE" | |
} | |
}, | |
"env": { | |
}, | |
"cpus": 0.1, | |
"mem": 256.0, | |
"instances": 1 | |
}] | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment