Postgres and MySQL databases are available as an add-on and are backed by AWS RDS. Database instances are designed to be shared across multiple apps in a cluster, but a cluster may have multiple database instances. If you wish to isolate a single app to a single database instance, you can do that too.
Creating a database cluster
First you must setup the database in your AppPack Cluster. This can be done with
apppack create database.
apppack create database my-database
This command requires administrator access.
Enabling the database add-on for your application
During app creation, you'll be asked if you'd like to enable the database add-on and if so, which database cluster to use. Only database instances within the app's AppPack cluster will be available as options.
Enabling the database add-on will create a dedicated database user within the database cluster and assign permissions to a specific database.
Destroying the application will also destroy the application's database. Be sure to download a backup first!
The following config variable will be provided to your application to connect:
DATABASE_URLthe credentials for connecting to the cluster