Adding "container commands" prevents Elasticbeanstalk environment from deploying

0

I have a django project deployed with "eb deploy" just fine with no errors, but when I add "container commands" to the folder ".ebextensions" the deploying fails.

Contents of the file .ebextensions > db-migrate.config:

container_commands:
  01_migrate:
    command: "source /var/app/venv/*/bin/activate && python manage.py makemigrations && python manage.py migrate"
    leader_only: true
option_settings:
  aws:elasticbeanstalk:application:environment:
    DJANGO_SETTINGS_MODULE: project_name.settings

What am I doing wrong ?

asked 2 months ago157 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions