Skip to content

andyklimczak/djangocms-heroku-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploying super basic djangocms application to Heroku with AWS S3

  1. Clone repo
  2. cp ._env_example .env
  3. Create a new postgres database createdb djangocms_test. Set the database url in .env Note that you might have to edit pg.cof to trust connections on localhost
  4. Create an AWS S3 bucket following the instructions here Also follow the CORS instructions at the bottom of the guide
  5. Edit .env with the 3 AWS values needed to connect to your S3 bucket
  6. Start the project locally,
  python manage.py migrate
  python manage.py createsuperuser
  python manage.py runserver
  1. Login to project (localhost:8000) and create a page with an Image component to test S3 is setup correctly locally
  2. Create new Heroku project, using the postgres addon and heroku/python build pack
  3. In the Settings tab of your Heroku project, add your 3 AWS environment variables, SECRET_KEY variable, add DISABLE_COLLECTSTATIC env variable with value of 1.
  4. Deploy the project to Heroku heroku push https://git.heroku...
  5. Run the djangocms migrations on your heroku instance heroku run python manage.py migrate
  6. Create a django admin user to log in to start making content heroku run python manage.py createsuperuser
  7. Go to your Heroku project, create a page, and add an Image component to make sure S3 is correctly setup.

If you spot anything incorrect, create an issue and let me know!

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published