Database

If you are ready to deploy a Django site, start by creating a database…

Create

Note

Make sure the Salt pillar is configured correctly for the site. You need to include the database password and a folder containing the database settings.

For details, see Site - Configuration

To create a database for a site:

cd fabric
fab domain:www.hatherleigh.info create_db

# if your would like to use a Postgres table space name
fab domain:www.hatherleigh.info create_db:cbs

To create a workflow database for a site:

fab domain:www.hatherleigh.info create_db_workflow

You are now ready to Deploy your site…

Drop/Delete

To drop a database, you will need to append the current date and time e.g:

fab domain:www.hatherleigh.info drop_db:02/02/2015-16:54

To drop a database role:

fab domain:www.hatherleigh.info drop_db_role

Note

This command should fail if the role is in use.

Maintenance