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 ?

已提問 2 個月前檢視次數 160 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南