How to translate docker-compose.yml to Dockerrun.aws.json for Django

前端 未结 2 1768
没有蜡笔的小新
没有蜡笔的小新 2020-12-29 04:46

I am following the instructions at https://docs.docker.com/compose/django/ to get a basic dockerized django app going. I am able to run it locally without a problem but I am

2条回答
  •  隐瞒了意图╮
    2020-12-29 05:23

    You have a few issues.

    1) 'web' doesn't appear to be an 'image', you define it as 'build . ' in your docker-compose.. Remember, the Dockerrun.aws.json will have to pull the image from somewhere (easiest is to use ECS's Repositories)

    2) I think 'command' is an array. So you'd have:

    "command": ["python" "manage.py" "runserver" "0.0.0.0:8000"]
    

    3) your mountPoints are correct, but the volume definition at the top is wrong. { "name": "web", "host": { "sourcePath": "/var/app/current/db" } Im not 100% certain, but the path works for me. if you have the Dockerrun.aws.json file, next to is a directory called /db .. then that will be the mount location.

提交回复
热议问题