Unable to add container commands for elastic beanstalk deployment

0

I have a django web app hosted via elastic beanstalk

Due to the fact that ./platform/hooks/postdeploy migrate command seems to no longer be working (https://repost.aws/questions/QUciLyPjuLThyZ-uLafausLg/elastic-beanstalk-database-migrations-no-longer-running) I have tried to use container commands in my django.config file instead

container_commands:
  00_test_output:
    command: "echo 'testing.....'"
  01_migrate:
    command: "source /var/app/venv/staging-LQM1lest/bin/activate && python manage.py migrate --noinput"
    leader_only: true

This, however, provokes the error on deployment:

2022-05-25 08:03:36    WARN    LoadBalancer awseb-e-g-AWSEBLoa-Q8MLS7VPZA00 could not be found.
2022-05-25 08:03:36    ERROR   Failed to deploy application.        
                                                                      
ERROR: ServiceError - Failed to deploy application.

This error occurs even if only the 00_test_output command is included. Does anyone have an idea as to why the loadbalancer cannot be found when container commands are added?

已提問 2 年前檢視次數 102 次
沒有答案

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

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

回答問題指南