docs/versioned_docs/version-2.9.4/setup/heroku.md
If you have any questions feel free to join our Slack Community or send us an email at [email protected].
Click the button below to start one click deployment.
<div style={{textAlign: 'center'}}> </div>On Heroku tab, you'll be asked to provide an App name and Choose a region. Enter the name for your deployment and select the region according to your choice.
Now let's enter the Config vars to configure additional environment variables that are required for the installation.
openssl rand -hex 32 to generate the key.openssl rand -hex 64 to generate the key.https://<app-name-in-first-step\>.herokuapp.com.Click on Deploy app button at the bottom to initiate the build.
After the successful build, you'll see two buttons at the bottom: Manage App and View. Click on the View to open the app or click on Manage App to configure any settings.
:::tip
ToolJet server and client can be deployed as standalone applications. If you do not want to deploy the client on Heroku, modify package.json accordingly. We have a guide on deploying ToolJet client using services such as Firebase.
:::
If you intend to use this feature, you'd have to set up and deploy PostgREST server which helps querying ToolJet Database.
This feature is only enabled if ENABLE_TOOLJET_DB is set to true in the Tooljet application.
:::note Please install Heroku CLI on your local machine. Please refer Heroku CLI installation steps here. :::
1.1 Create a folder with your app name. Please give a unique name to the app.
mkdir ${YOUR_PGRST_APP_NAME}
cd $${YOUR_PGRST_APP_NAME}
git init
1.2 Add PostgREST buildpack to your app.
heroku apps:create ${YOUR_PGRST_APP_NAME} --buildpack https://github.com/PostgREST/postgrest-heroku.git
heroku git:remote -a ${YOUR_PGRST_APP_NAME}
${HEROKU_PG_DB_NAME Should be the name of the PostgreSQL created by the Tooljet app.
You can get the ${HEROKU_PG_DB_NAME of the Tooljet application from the Resources tab under Heroku Postgres attachments as shown below. (eg: ${HEROKU_PG_DB_NAME = postgresql-transparent-24158 ).
heroku addons:attach ${HEROKU_PG_DB_NAME} -a ${YOUR_PGRST_APP_NAME}
:::info The Procfile is a simple text file that is named Procfile without a file extension. For example, Procfile.txt is not valid. :::
Please paste the below string within the Procfile file.
web: PGRST_SERVER_HOST=0.0.0.0 PGRST_SERVER_PORT=${PORT} PGRST_DB_URI=${PGRST_DB_URI:-${DATABASE_URL}} ./postgrest-${POSTGREST_VER}
You can also refer environment variable here.
:::tip
If you have openssl installed, you can run the
command openssl rand -hex 32 to generate the value for PGRST_JWT_SECRET.
If this parameter is not specified, PostgREST will refuse authentication requests. :::
heroku config:set PGRST_JWT_SECRET=
heroku config:set POSTGREST_VER=10.0.0
You can also refer environment variable here.
git add Procfile
git commit -m "PostgREST on Heroku"
git push --set-upstream heroku main
Your Heroku app should be live at ${YOUR_APP_NAME}.herokuapp.com.
Please enter the below env variables in the Tooljet application, under the setting tab. You can also refer environment variable here.
The latest version includes architectural changes and, hence, comes with new migrations.
If this is a new installation of the application, you may start directly with the latest version. This guide is not required for new installations.
It is crucial to perform a comprehensive backup of your database before starting the upgrade process to prevent data loss.
Ensure that your current version is v2.23.0-ee2.10.2 before upgrading.
Users on versions earlier than v2.23.0-ee2.10.2 must first upgrade to this version before proceeding to the latest version.
For specific issues or questions, refer to our Slack.