--AWS ElasticBeanstalk container_commands: Commands trigger errors even if they were correct

44 Views Asked by At

I have a django project that I want to deploy with ElasticBeanstalk, I defined a [xxxx.config] file in .ebextensions, the content of the file is:

xxxx.config

container_commands:
  acvenv:
    command: "source /var/app/venv/*/bin/activate"
  migrate:
    command: "python /var/app/current/manage.py migrate"

But the project doesn't deploy unless I remove xxxx.config.

I follow the documentation:

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html

What am I doing wrong?

The output of eb logs:

2024/03/10 06:43:07.470696 [INFO] Error occurred during build: Command migrate failed

2024/03/10 06:43:07.470721 [ERROR] An error occurred during execution of command [app-deploy] - [PostBuildEbExtension]. Stop running the command. Error: container commands build failed. Please refer to /var/log/cfn-init.log for more details.

0

There are 0 best solutions below