Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7725565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:58:15+00:00 2026-06-01T04:58:15+00:00

I am creating a small commercial web project running Apache/WSGI/Django/MySQL. I have a development

  • 0

I am creating a small commercial web project running Apache/WSGI/Django/MySQL.
I have a development and a production environment and use git and fabric to push/pull modifications.

Now I’d like to be able to test new versions with similar conditions to the production server before making them live.

  • I am thinking of using the same physical server with different URLs and different repositories (is this ok ?).
  • Are there best practices to set up this pre-prod environment as close as possible to the prod ?
  • Should I use the same web server and database server ? In that case how can I manage for example the database name ?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:58:16+00:00Added an answer on June 1, 2026 at 4:58 am

    I am working on a similar setup to the one you describe with no major problems. Multiple databases are easily managed in the settings file, I change them based on the root dir name:

    ROOTDIR = os.path.abspath(os.path.dirname(__file__))
    
    if ROOTDIR.startswith("dev_"):
        # -------- Developing settings ---------
        DOMAIN_NAME = 'dev.foo.com'
        DATABASES = {
            'default':{
                'ENGINE': 'django.db.backends.postgresql_psycopg2', 
                'NAME': 'development_db',         
                'USER': 'xxxx',          
                'PASSWORD': 'xxxxx',       
                'HOST': 'localhost',         
                'PORT': '',                  
                'OPTIONS': {'autocommit': True,}
            }
        }
    
    
    elif ROOTDIR.startswith("production_"):
        # --------- Production settings --------
        DEBUG = False
        DOMAIN_NAME = 'production.foo.com'
        TEMPLATE_DEBUG = DEBUG
        DATABASES = {
            'default':{
                'ENGINE': 'django.db.backends.postgresql_psycopg2', 
                'NAME': 'production_db',     
                'USER': 'xxx',           
                'PASSWORD': 'xxx',        
                'HOST': 'localhost',         
                'PORT': '',                 
                'OPTIONS': {'autocommit': True,}
            }
        }
    else:
    # ....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a small web application. The application have several screens (list, inner list,
I am creating small django application which holds some few questions (and answers for
I'm creating a small application on an embedded device that has a boa web
I'm creating a small, web based, mail client in PHP and noticed that a
i am creating a small scala DSL and running into the following problem to
I'm creating a small game and I have a peace of code that collects
I'm creating a small web site that will mostly be used with modern smart
I have a task to create a website that'll allow creating small websites, mostely
I am creating a small HTML editor using jQuery. I have created my own
I'm creating a small web page using jquery-ui-1.8 which is having a frameset and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.