Check out the tutorial.
-
Fork/Clone
-
Create and activate a virtual environment:
$ python3 -m venv venv && source venv/bin/activate
-
Install the requirements:
(venv)$ pip install -r requirements.txt
-
Spin-up a PostgreSQL container:
(venv)$ docker run --name django-images-postgres -p 5432:5432 \ -e POSTGRES_USER=django-images -e POSTGRES_PASSWORD=complexpassword123 \ -e POSTGRES_DB=django-images -d postgres
-
Apply the migrations:
(venv)$ python manage.py migrate
-
Run the server:
(venv)$ python manage.py runserver
-
Navigate to http://localhost:8000/ in your favorite web browser.
-
Initialize Elastic Beanstalk:
$ eb init
-
Create an Elastic Beanstalk environment:
$ eb create django-images-env
-
Obtain your EB CNAME by running
eb status
and add it toALLOWED_HOSTS
inside core/settings.py. -
Configure AWS RDS, S3, and Certificate Manager
-
Commit all the changed files to git and deploy:
$ git add . $ git commit -m "updates for eb" $ eb deploy
-
Open the web application in your favorite web browser:
$ eb open