有没有办法从 AWS ECS 任务定义中的环境变量中指定容器端口?
这是在我的 task-definition.json 中,由 Github Actions 使用
"containerDefinitions": [
{
"portMappings": [
{
"containerPort": 3037 <=== Can this come from environment variable defined below?
}
],
"essential": true,
"environment": [
{
"name": "PORT",
"value": "3037"
}
]
}
],
"requiresCompatibilities": ["EC2"]