![](/img/trans.png)
[英]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.