我正在尝试在我的 AWS 账户中部署和配置N8N 。现在,我面临着两个挑战,但运行和配置其 Docker 映像有点棘手。不过,我将重点关注最重要的一个,我可以通过其 IP 访问该网站:
但是,我无法通过我配置的通过 Route 53 链接到我的应用程序负载均衡器的域访问它:
我知道自从我获得证书以来该域工作正常:
这是任务定义 JSON,您将需要 EFS 来配置它:
{
"family": "n8n",
"containerDefinitions": [
{
"name": "n8n",
"image": "n8nio/n8n:latest",
"cpu": 0,
"portMappings": [
{
"name": "n8n-80-tcp",
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp",
"appProtocol": "http"
},
{
"name": "n8n-5678-tcp",
"containerPort": 5678,
"hostPort": 5678,
"protocol": "tcp"
},
{
"name": "n8n-443-tcp",
"containerPort": 443,
"hostPort": 443,
"protocol": "tcp"
}
],
"essential": true,
"environment": [],
"environmentFiles": [],
"mountPoints": [
{
"sourceVolume": "n8n_data",
"containerPath": "/data",
"readOnly": false
}
],
"volumesFrom": [],
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-create-group": "true",
"awslogs-group": "/ecs/n8n",
"awslogs-region": "eu-west-1",
"awslogs-stream-prefix": "ecs"
},
"secretOptions": []
},
"systemControls": []
}
],
"taskRoleArn": "arn:aws:iam::YOUR_ID:role/ecsTaskExecutionRole",
"executionRoleArn": "arn:aws:iam::YOUR_ID:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"volumes": [
{
"name": "n8n_data",
"efsVolumeConfiguration": {
"fileSystemId": "fs-YOUR_EFS",
"rootDirectory": "/db"
}
}
],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "256",
"memory": "2048",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
}
}
正如您所看到的,这个问题非常奇怪,因为我无法访问我在 Route 53 中配置的 URL,该 URL 是我的 ALB 的别名,与运行我的 ECS 服务的 URL 相同。奇怪的是,正如我之前所展示的,我可以毫无问题地到达任务 IP。
这些是我当前配置的一些图片:
白蛋白:
安全组:
目标组:
服务配置:
云服务器服务:
知道我可能做错了什么吗?