Django App Prerequisites for AWS Elastic Beanstalk: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
[[Category:Django]] [[Category:AWS]] [[Category:Web Development]]
[[Category:Django]][[Category:AWS]][[Category:Elastic Beanstalk]][[Category:Web Development]]
== Create a virtual Python environment for the Django project ==
== Create a virtual Python environment for the Django project ==



Revision as of 04:35, 1 June 2020

Create a virtual Python environment for the Django project

Install virtualenv if needed:

$ which virtualenv
$ pip install virtualenv

Create the virtual Python Environment[1]

$ virtualenv -p python3.4 /path/to/project_venv

Where /path/to/project_env is a path unique to the project.

Start the virtual environment:

$ . /path/to/project_venv/bin/activate

Confirm the Python version:

$ python --version

Leave the virtual environment:

$ deactivate

Create a Django application locally

  • Install all prerequisites necessary for the Django app, e.g. Python, pip, Django, etc.
  • See Working With Django Projects, The Basics
  • Run and test the Django application locally, e.g. with python manage.py runserver.

Install AWS Elastic Beanstalk CLI [2]

Install the AWS Elastic Beanstalk cli:

N.B. See the Troubleshooting article for issues installing awsebcli on Mac OS X.

$ pip install awsebcli

Confirm the installation with eb --version

At this point the directory is ready to have an Elastic Beanstalk application created with eb init. See Deploying a Django app on AWS.

Notes

See also

References