我是AWS ECS的新手。我使用旧版本的strapi alpha.12 .12启动了一个ECS实例,它在启动端运行良好,但它有一些bug。一个新版本A.12.4已经修复了这些bug。我在当地经营一个集装箱,它运转良好。我在第3版中使用了坞式写作。
问题是当我在AWS中部署这个容器时。我使用了与上一个工作实例相同的任务定义,只是更改了标记。我使用了最近版本的特定标记,而不是最新版本,只是为了排除任何缓存的可能性。当然,我也试过使用最新的标签。他们似乎都不起作用。
作为最后一次尝试,我使用ECS部署了容器,问题仍然存在。
任何解决这个问题的建议都是很好的。
更新
{
"executionRoleArn": null,
"containerDefinitions": [
{
"dnsSearchDomains": [],
"logConfiguration": null,
"entryPoint": [],
"portMappings": [
{
"hostPort": 80,
"protocol": "tcp",
"containerPort": 1337
}
],
"command": [],
"linuxParameters": {
"capabilities": {
"add": null,
"drop": null
},
"sharedMemorySize": null,
"tmpfs": null,
"devices": null,
"initProcessEnabled": null
},
"cpu": 10,
"environment": [
{
"name": "APP_NAME",
"value": "strapi-app"
},
{
"name": "DATABASE_CLIENT",
"value": "mongo"
},
{
"name": "DATABASE_HOST",
"value": "db"
},
{
"name": "DATABASE_NAME",
"value": "strapi"
},
{
"name": "DATABASE_PASSWORD",
"value": ""
},
{
"name": "DATABASE_PORT",
"value": "27017"
},
{
"name": "DATABASE_USERNAME",
"value": ""
}
],
"ulimits": null,
"dnsServers": [],
"mountPoints": [
{
"readOnly": false,
"containerPath": "/usr/src/api/strapi-app",
"sourceVolume": "volume-0"
}
],
"workingDirectory": null,
"dockerSecurityOptions": [],
"memory": 512,
"memoryReservation": null,
"volumesFrom": [],
"image": "strapi/strapi",
"disableNetworking": null,
"healthCheck": null,
"essential": true,
"links": [
"db"
],
"hostname": null,
"extraHosts": null,
"user": null,
"readonlyRootFilesystem": false,
"dockerLabels": null,
"privileged": false,
"name": "api"
},
{
"dnsSearchDomains": [],
"logConfiguration": null,
"entryPoint": [],
"portMappings": [
{
"hostPort": 27017,
"protocol": "tcp",
"containerPort": 27017
}
],
"command": [],
"linuxParameters": {
"capabilities": {
"add": null,
"drop": null
},
"sharedMemorySize": null,
"tmpfs": null,
"devices": null,
"initProcessEnabled": null
},
"cpu": 10,
"environment": [
{
"name": "MONGO_INITDB_DATABASE",
"value": "strapi"
}
],
"ulimits": null,
"dnsServers": [],
"mountPoints": [
{
"readOnly": false,
"containerPath": "/data/db",
"sourceVolume": "volume-2"
}
],
"workingDirectory": null,
"dockerSecurityOptions": [],
"memory": 512,
"memoryReservation": null,
"volumesFrom": [],
"image": "mongo",
"disableNetworking": null,
"healthCheck": null,
"essential": true,
"links": [],
"hostname": null,
"extraHosts": null,
"user": null,
"readonlyRootFilesystem": false,
"dockerLabels": null,
"privileged": false,
"name": "db"
}
],
"placementConstraints": [],
"memory": null,
"taskRoleArn": "arn:aws:iam::**myaccount**:role/ecsTaskExecutionRole",
"compatibilities": [
"EC2"
],
"taskDefinitionArn": "arn:aws:ecs:eu-central-1:**myaccount**:task-definition/sriharsha:16",
"family": "sriharsha",
"requiresAttributes": [
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.17"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.task-iam-role"
}
],
"requiresCompatibilities": [
"EC2"
],
"networkMode": "bridge",
"cpu": null,
"revision": 16,
"status": "ACTIVE",
"volumes": [
{
"name": "volume-2",
"host": {
"sourcePath": "/db"
}
},
{
"name": "volume-0",
"host": {
"sourcePath": "/strapi-app"
}
},
{
"name": "volume-1",
"host": {
"sourcePath": "/usr/src/api/strapi-app/node_modules"
}
}
]
}发布于 2018-06-28 11:08:43
回答我自己的问题。
我构建了一个基于12.5发行版的新的自定义映像,它在AWS中运行得很好。
该映像尚未在dockerhub上的官方存储库中找到。
我的自定义图像可以从spolimetla/strapi中提取。
https://stackoverflow.com/questions/50966915
复制相似问题