Deployment
Applications built with Platformatic DB can be deployed to a hosting service in the same way as any other Node.js application. This guide covers a few things that will help smooth the path from development to production.
Running a Platformatic DB application
Make the Platformatic CLI available
To run a Platformatic DB application, the Platformatic CLI must be available
in the production environment. The most straightforward way of achieving this
is to install it as a project dependency.
This means that when npm install
(or npm ci
) is run as part of your
build/deployment process, the Platformatic CLI will be installed.
Define an npm run script
A number of hosting services will automatically detect if your project's
package.json
has a start
npm run script. They will then execute the command
npm start
to run your application in production.
You can add platformatic db start
as the command for your project's start
npm run script, for example:
{
...
"scripts": {
"start": "platformatic db start",
},
}
Server configuration
See the Configuration reference for all configuration settings.