Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

240
Views
Django/Mezzanine/S3/Bootstrap - Looking for local dev / remote production setup suggestions

I'm not having any luck elsewhere so I appreciate any help/suggestions I get here. Here's a rundown of what I'd like to do:

  • Local development environment of Mezzanine, which would also integrate Bootstrap for front-end, static/media served by S3.
  • Push to GitHub with unique config files (settings.py, API keys, S3 settings, etc) in .gitignore.
  • Pull to remote production server for publishing on web.

I want to use GitHub as a way to track and display what I'm doing with my website. The problem I'm running into is how to efficiently manage the files in .gitignore to make sure the necessary configs are present on the production server. What would be a "best practice" for this scenario?

The local development environment would be used for working on front-end more than back-end but should I have an identical setup locally to match production server setup? For example, serving production static/media with S3, changing db to PostgreSQL for production, etc...should I mirror these on production server manually?

One guide I've been reading is https://tutorial.djangogirls.org/en/ but they don't really mention how to manage major back-end differences that aren't pushed to the repo.

Thanks!

EDIT: Found this How to manage local vs production settings in Django? but it's pretty old. Relevant?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I would try to use and dig deeper in the docs of django-environ Also study how pydanny does it in this starter template, you will master the art of deploying with s3 https://github.com/pydanny/cookiecutter-django

over 4 years ago · Santiago Trujillo Report

0

After doing a bunch of searching and chatting on IRC (#django on freenode), I found the following links which answered my question:

  • https://12factor.net/
  • https://github.com/doismellburning/django12factor
  • https://github.com/joke2k/django-environ (thanks wisemukiga)
  • https://github.com/pydanny/cookiecutter-django (thanks wisemukiga)

As for keeping sensitive config and site-specific settings info out of GitHub, I'm going to follow 12factor and make dev/prod environments as identical as possible but keep the prod config settings on prod server since the local dev environment won't be dependent on them. I'll also be using the envs no prod server so I don't have to change code being pushed to GitHub.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!