How to check if database is present and migrated in Elastic Beanstalk?

Viewed 6

I have been trying to troubleshoot 500 error, on a Django REST framework + ReactJS app. I think the migrate is not executing correctly.

The db-migrate.config file:

container_commands:
  01_migrate:
    command: "source $PYTHONPATH/activate pipenv run python manage.py migrate"
    leader_only: true

DB_SETTINGS: eventually I want to change this to RDS

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
}

eb deploy is successful.

I still run into the 500 error, on localmachine the same endpoint works perfectly.

How can I check whether the database on Elastic Beanstalk has the necessary migrations? Any other causes I should be looking into?

0 Answers
Related