问题描述:

I have created the project with command

:: eb create --database.engine postgres --region ap-southeast-1.

It shows that my deployment is successful.

Also when I run command :: eb open, it successfully open my project website.

Also when I checked eb-activity logs on my instance at /var/log/eb-activity.log, it also shows migration successful when I deployed my project.

But When I tried to run $ python manage.py migrate manually on Elastic Beanstalk instance it gives error,

django.db.utils.OperationalError: could not connect to server: Connection refused

Is the server running on host "localhost" (127.0.0.1) and accepting

TCP/IP connections on port 5432?

Also when I tried to create a user manually on python manage.py shell. It again gives error,

django.db.utils.OperationalError: could not connect to server: Connection refused

Is the server running on host "localhost" (127.0.0.1) and accepting

TCP/IP connections on port 5432?

I want to access postgres database on elastikbeanstalk instance and want to use commands

$ python manage.py migrate.

Is there a way to do that?

相关阅读:
Top