[英]Deploying to specific container in AWS multicontainer docker environment
[英]How to access my prometheus dashboard which are running in aws multiContainer docker?
我在 aws docker 上运行 prometheus 和 grafana 图像,它们分别在0.0.0.0:9090->9090/tcp和0.0.0.0:3000->3000/tcp端口中运行,但我不知道如何访问这个 prometheus和使用端点的 grafana 仪表板。 我尝试使用 (MachineIP:9090) 访问,但无法访问。 任何人都可以有这个想法吗?
{
"AWSEBDockerrunVersion": 2,
"volumes": [
{
"name": "php-app",
"host": {
"sourcePath": "/var/app/current/php-app"
}
},
{
"name": "nginx-proxy-conf",
"host": {
"sourcePath": "/var/app/current/proxy/conf.d"
}
}
],
"containerDefinitions": [
{
"name": "php-app",
"image": "php:fpm",
"essential": true,
"memory": 128,
"mountPoints": [
{
"sourceVolume": "php-app",
"containerPath": "/var/www/html",
"readOnly": true
},
{
"sourceVolume": "awseb-logs-php-app",
"containerPath": "/var/log/sample-app"
}
]
},
{
"name": "nginx-proxy",
"image": "nginx",
"essential": true,
"memory": 128,
"portMappings": [
{
"hostPort": 80,
"containerPort": 80
}
],
"links": [
"php-app"
],
"mountPoints": [
{
"sourceVolume": "php-app",
"containerPath": "/var/www/html",
"readOnly": true
},
{
"sourceVolume": "awseb-logs-nginx-proxy",
"containerPath": "/var/log/nginx"
},
{
"sourceVolume": "nginx-proxy-conf",
"containerPath": "/etc/nginx/conf.d",
"readOnly": true
}
]
}
]
}
您需要在弹性 bean 会话负载均衡器和您的 docker 实例之间进行端口映射。
还要确保在安全组中允许端口80
和9090
参考: https : //docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.