How to translate docker-compose.yml to Dockerrun.aws.json for Django
<p>I am following the instructions at <a href="https://docs.docker.com/compose/django/" rel="noreferrer">https://docs.docker.com/compose/django/</a> to get a basic dockerized django app going. I am able to run it locally without a problem but I am having trouble to deploy it to AWS using Elastic Beanstalk. After reading <a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_v2config.html" rel="noreferrer">here</a>, I figured that I need to translate docker-compose.yml into Dockerrun.aws.json for it to work.</p>

<p>The original docker-compose.yml is</p>

<pre><code>version: '2'
services:
  db:
    image: postgres
  web:
    build: .
    command: python manage.py runserver 0.0.0.0:8000
    volumes:
      - .:/code
    ports:
      - "8000:8000"
    depends_on:
      - db
</code></pre>

<p>and here is what I translated so far</p>

<pre><code>{
  "AWSEBDockerrunVersion": 2,
  "volumes": [
    {
      "name": "db"
    },
    {
      "name": "web"
    }
  ],
  "containerDefinitions": [
    {
      "name": "db",
      "image": "postgres",
      "essential": true,
      "memory": 256,
      "mountPoints": [
        {
          "sourceVolume": "db"
          "containerPath": "/var/app/current/db"
        }
      ]
    },
    {
      "name": "web",
      "image": "web",
      "essential": true,
      "memory": 256,
      "mountPoints": [
        {
          "sourceVolume": "web"
          "containerPath": "/var/app/current/web"
        }
      ],
      "portMappings": [
       {
         "hostPort": 8000,
         "containerPort": 8000
       }
     ],
     "links": [
        "db"
      ],
      "command": "python manage.py runserver 0.0.0.0:8000"
    }
  ]
}
</code></pre>

<p>but it's not working. What am I doing wrong?</p>