Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does Elastic Beanstalk store my Django app's files?

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.

like image 360
jdogg Avatar asked Sep 16 '15 15:09

jdogg


People also ask

Where does Elastic Beanstalk store application files?

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.

Where does Django app deploy?

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.

Where are environment variables stored Elastic Beanstalk?

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.


1 Answers

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

like image 161
Lane Rettig Avatar answered Oct 01 '22 16:10

Lane Rettig