In the beginning, everything was fine using only psycopg2-binary in my virtual environment. So I uploaded the code to EB and eveythings goes fine.
When you changed the strategy (start serving static and media files using S3), you needed to install django-storages and change some configurations at settings.py file. Creating static files using this new strategy seems to require psycopg2.extensions which is not available through the binary package (psycopg2-binary). To try to override this problem, I installed psycopg2 in my virtual environment and I could made the static files, but other problem arised: Elastic Beanstalk was not able to install psycopg2.
Using this solution, EB was able to install psycopg2 and my app worked well again.
You course was really good, but I think the deployment section was a bit tricky and I had to spend some time to be able to do the deploy.
In the beginning, everything was fine using only
psycopg2-binary
in my virtual environment. So I uploaded the code to EB and eveythings goes fine.When you changed the strategy (start serving static and media files using S3), you needed to install
django-storages
and change some configurations atsettings.py
file. Creating static files using this new strategy seems to requirepsycopg2.extensions
which is not available through the binary package (psycopg2-binary
). To try to override this problem, I installedpsycopg2
in my virtual environment and I could made the static files, but other problem arised: Elastic Beanstalk was not able to installpsycopg2
.I came to a solution using this answer: https://stackoverflow.com/a/63204453/11122513
He added a file
01_packages.config
inside.ebextensions
with this content:Using this solution, EB was able to install
psycopg2
and my app worked well again.You course was really good, but I think the deployment section was a bit tricky and I had to spend some time to be able to do the deploy.
Thanks, Igor