My static files aren't being found on my EB site. It worked just fine in my local virtualenv, but when I pushed them up to Elastic Beanstalk the static files aren't found.
I'm trying to do some digging into my Elastic Beanstalk's EC2 Instance to find where my Django app's files are, and hopefully from there I can find out why my static files aren't loading.
I'm on Ubuntu 14.04.
In Elastic Beanstalk, where does it store the application files and server log files? Application files are stored in S3. The server log files can only be stored in the attached EBS volumes of the EC2 instances, which were launched by AWS Elastic Beanstalk. Application files are stored in S3.
For hosting web applications built on Django, you will need to use a platform that lets you deploy the app. One of these platforms is Heroku. Heroku is a cloud platform on which users can build and deploy applications. Heroku relies on Git, a revision control system that lets you manage the program code of your app.
Environment properties are written to the /opt/python/current/env file, which is sourced into the virtualenv stack where the application runs. For more information, see Using the Elastic Beanstalk Python platform.
In Amazon Linux, I see my Python app's files in /opt/python/current/app
. This is under Apache using WSGI; I figured it out by looking at /etc/httpd/conf.d/wsgi.conf
.
$ uname -a
Linux ip-10-45-93-242 4.4.15-25.57.amzn1.x86_64 #1 SMP Wed Jul 27 22:37:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With