I tried to run Multicontainer Docker in AWS Elastic Beanstalk. Here is my Dockerrun.aws.json
{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [
{
"command": ["python", "manage.py", "runserver", "0.0.0.0:8000"
],
"environment": [
{
"name": "JAEGER_AGENT_HOST",
"value": "jaeger"
},
{
"name": "STOREFRONT_URL",
"value": "http://localhost:3000/"
},
{
"name": "DASHBOARD_URL",
"value": "http://localhost:9000/"
}
],
"memory": 512,
"image": "saleor-platform_api",
"essential": true,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/app/tests",
"sourceVolume": "_SaleorTests"
},
{
"containerPath": "/app/media",
"sourceVolume": "Saleor-Media"
},
{
"containerPath": "/app/saleor",
"sourceVolume": "_Saleor"
},
{
"containerPath": "/app/templates",
"sourceVolume": "Saleor-templates"
}
],
"name": "api",
"portMappings": [
{
"containerPort": 8000,
"hostPort": 8000
}
]
},
{
"environment": [
{
"name": "POSTGRES_USER",
"value": "saleor"
},
{
"name": "POSTGRES_PASSWORD",
"value": "saleor"
}
],
"essential": true,
"memory": 256,
"image": "library/postgres:11.1-alpine",
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/var/lib/postgresql",
"sourceVolume": "Saleor-Db"
}
],
"name": "db",
"portMappings": [
{
"containerPort": 5432,
"hostPort": 5432
}
]
},
{
"essential": true,
"image": "jaegertracing/all-in-one",
"name": "jaeger",
"memory": 256,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"portMappings": [
{
"containerPort": 5775,
"hostPort": 5775,
"protocol": "udp"
},
{
"containerPort": 6831,
"hostPort": 6831,
"protocol": "udp"
},
{
"containerPort": 6832,
"hostPort": 6832,
"protocol": "udp"
},
{
"containerPort": 5778,
"hostPort": 5778
},
{
"containerPort": 16686,
"hostPort": 16686
},
{
"containerPort": 14268,
"hostPort": 14268
},
{
"containerPort": 9411,
"hostPort": 9411
}
]
},
{
"essential": true,
"image": "library/redis:5.0-alpine",
"memory": 256,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/data",
"sourceVolume": "Saleor-Redis"
}
],
"name": "redis",
"portMappings": [
{
"containerPort": 6379,
"hostPort": 6379
}
]
},
{
"command": [
"celery",
"-A",
"saleor",
"worker",
"--app=saleor.celeryconf:app",
"--loglevel=info"
],
"image": "saleor-platform_worker",
"memory": 256,
"essential": true,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/app/media",
"sourceVolume": "Saleor-Media"
}
],
"name": "worker"
}
],
"family": "",
"volumes": [
{
"host": {
"sourcePath": "./saleor/saleor/"
},
"name": "_Saleor"
},
{
"host": {
"sourcePath": "./saleor/templates/"
},
"name": "Saleor-templates"
},
{
"host": {
"sourcePath": "./saleor/tests/"
},
"name": "_SaleorTests"
},
{
"host": {
"sourcePath": "saleor-media"
},
"name": "Saleor-Media"
},
{
"host": {
"sourcePath": "saleor-db"
},
"name": "Saleor-Db"
},
{
"host": {
"sourcePath": "saleor-redis"
},
"name": "Saleor-Redis"
}
]
}
However, when I typed "eb local run", it gives me the error "ERROR: ValidationError - The AWSEBDockerrunVersion key in the Dockerrun.aws.json file is not valid or is not included." Does anyone know why? Thanks
Based on the comments.
The issue was that a EB Docker platform was incorrect and/or not chosen.
The solution was to select a correct platform using:
eb platform select