Skip to content

Instantly share code, notes, and snippets.

@michaelconnor00
Last active August 9, 2020 05:46
Show Gist options
  • Save michaelconnor00/2877e496b9bc1f43872e to your computer and use it in GitHub Desktop.
Save michaelconnor00/2877e496b9bc1f43872e to your computer and use it in GitHub Desktop.
Run Django Commands from AWS Elastic Beanstalk Virtual Environment

How to run manage.py from AWS Elastic Beanstalk

Note this is for eb python platform, it is different for Docker

Location of Current App:

  cd /opt/python/current/app

Location of Venv:

  cd /opt/python/run/venv/bin/
  # OR activate environment
  source /opt/python/run/venv/bin/activate
  # OR run command...
  /opt/python/run/venv/bin/python ...

Activate venv and Run Django commands:

  source /opt/python/run/venv/bin/activate
  source /opt/python/current/env
  cd /opt/python/current/app
  python manage.py <commands>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment