Resource Creation

You can create PostgreSQL databases using the convox resources create command:

$ convox resources create postgres
Creating postgres-3785 (postgres)... CREATING

This will provision postgres database on the Amazon RDS service. Creation can take up to 15 minutes. To check the status use convox resources info.

Additional Options

--allocated-storage=10Size of the database in GB
--database=appThe name of the database to create
--instance-type=db.t2.microRDS instance type to use
--max-connections={DBInstanceClassMemory/15000000}Maximum connections to allow
--multi-azEnhanced availability and durability
--name=<name>The name of the resource to create
--password=<password>Database server password
--privateCreate in private subnets
--username=<username>Database server username
--version=9.5.2Postgres version

Resource Information

To see relevant info about the database, use the convox resources info command:

$ convox resources info postgres-3785
Name    postgres-3785
Status  running
URL     postgres://

Resource Linking

You can add this URL to any application with convox env set:

$ convox env set 'DATABASE_URL=postgres://' --app example-app

Resource Deletion

To delete the database, use the convox resources delete command:

$ convox resources delete postgres-3785
Deleting postgres-3785... DELETING

Deleting the database will take several minutes.

This action will cause an unrecoverable loss of data.