Database Setup
Choose where your generated platform stores its data.
You configure the database from your project Settings page, on the Integrations tab, in the Database section.
Default Database
Use default Dockerized database is turned on by default. Your bundle then includes a PostgreSQL database that runs in its own Docker container next to your platform, with its data kept in a Docker volume. There is nothing to configure.
Choose this option if you want to get up and running quickly without bringing your own data store.
Custom SQL Database
To connect your own PostgreSQL database instead:
- Turn off Use default Dockerized database.
- Under Database Type, choose SQL (PostgreSQL, MySQL, Supabase...). Your platform connects to PostgreSQL only, so the database must be PostgreSQL.
- Fill in the connection details:
- Host: Database server hostname or IP address
- Port: Database port (default
5432) - User: Database username
- Database Name: Database name
- Password: Database password
- Optionally click Test Connection to verify the credentials.
- Click Save.
Your bundle then no longer includes a database container, and your platform connects to the host you entered. It connects over SSL, so your database must accept SSL connections.
If your database isn't reachable from the internet, DevOur can't test it. Check Do not test connection to the database. I know what I am doing, my database is not externally reachable. It disables Test Connection and lets you save without filling in Host, User, and Database Name.
Firestore
To use Firebase Firestore as your data store:
- Turn off Use default Dockerized database.
- Under Database Type, choose Firebase Firestore.
- Make sure the service account you uploaded in the Firebase section has the permissions needed to read and write Firestore.
- Click Save.
- Click Test Firebase Configuration to check your saved Firebase settings and service account.
Saving Your Choice
The Database section has its own Save button, which saves only the database settings. Your database choice is stored with the rest of your project configuration and is included the next time you create a version and download your bundle.
From the CLI
Set databaseType (sql or firestore), dbHost, dbPort, dbUser,
dbName, and dbPassword in your configuration file and run
devour setup --config devour.json, or change one setting with
devour setup --key dbHost --value db.example.com.
Use default Dockerized database can only be changed in the web app. Turn it off there to use the database you configure from the CLI. See the CLI Reference.