Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is my python-flask app source stored on ec2 instance deployed with elastic beanstalk?

I just deployed a flask-python app with elastic beanstalk on AWS but cannot locate my app source files like application.py or templates/index.html etc

I've looked at looked at /var/../.. or /opt/../.. etc but nowhere to be found.

Is there an ebs command like $ eb find 'filename.py' etc?

like image 362
joke4me Avatar asked Aug 27 '17 07:08

joke4me


2 Answers

  • /opt/python – Root of where you application will end up.
  • /opt/python/current/app – The current application that is hosted in the environment.
  • /opt/python/on-deck/app – The app is initially put in on-deck and then, after all the deployment is complete, it will be moved to current. If you are getting failures in yourcontainer_commands, check out out the on-deck folder and not the current folder.
  • /opt/python/current/env – All the env variables that eb will set up for you. If you are trying to reproduce an error, you may first need to source /opt/python/current/env to get things set up as they would be when eb deploy is running.
  • opt/python/run/venv – The virtual env used by your application; you will also need to run source /opt/python/run/venv/bin/activate if you are trying to reproduce an error
like image 130
dkarchmer Avatar answered Sep 17 '22 16:09

dkarchmer


As of today, using the default AWS Linux option when creating eb (Python 3.7 running on 64bit Amazon Linux 2/3.1.1), I found the application files in:

/var/app/current

If that doesn't work you can search for a file that you know to be unique in your app, e.g

sudo find / -name hello.html

In my case the above returns /var/app/current/templates/hello.html

like image 32
brandondavid Avatar answered Sep 19 '22 16:09

brandondavid