跳到主要内容
版本:v2.0.0

Deploying ToolJet on Google Cloud Run

信息

You should setup a PostgreSQL database manually to be used by ToolJet.

Follow the steps below to deploy ToolJet on Cloud run with gcloud CLI.

Deploying ToolJet application

  1. Cloud Run requires prebuilt image to be present within cloud registry. You can pull specific tooljet image from docker hub and then tag with your project to push it to cloud registry.

    gcloud auth configure-docker
    docker pull tooljet/tooljet-ce:latest
    docker tag tooljet/tooljet-ce:latest gcr.io/<replace-your-project-id>/tooljet/tooljet-ce:latest
    docker push gcr.io/<replace-your-project-id>/tooljet/tooljet-ce:latest

    Please run the above command by launching GoogleCLI which will help to push the Tooljet application image to Google container registry.

    CLI
  1. Create new cloud run service

    Select and add the pushed Tooljet application image as shown below.

    tooljet-app-service
  2. Ingress and Authentication can be set as shown below, to begin with. Feel free to change the security configurations as per you see fit.

    ingress-auth
  3. Under containers tab, please make sure the port is set 3000 and command npm, run, start:prod is entered in container argument field with CPU capacity is set to 2GiB.

    port-and-capacity-tooljet
  1. Under environmental variable please add the below Tooljet application variables. You can also refer env variable here.

    Update TOOLJET_HOST environment variable if you want to use the default url assigned with Cloud run after the initial deploy.

    env-variable-tooljet
提示

If you are using Public IP for Cloud SQL, then database host connection (value for PG_HOST) needs to be set using unix socket format, /cloudsql/<CLOUD_SQL_CONNECTION_NAME>.

  1. Please go to the connection tab. Under Cloud SQL instance please select the PostgreSQL database which you have set-up.

    cloud-SQL-tooljet

Click on deploy once the above parameters are set.

信息

Once the Service is created and live, to make the Cloud Service URL public. Please follow the steps here to make the service public.

Deploying ToolJet Database

If you intend to use this feature, you'd have to set up and deploy PostgREST server which helps querying ToolJet Database.

PostgREST server

  1. Cloud Run requires prebuilt image to be present within cloud registry. You can pull specific PostgREST image from docker hub and then tag with your project to push it to cloud registry.

    gcloud auth configure-docker
    docker pull postgrest/postgrest:v10.1.1.20221215
    docker tag postgrest/postgrest:v10.1.1.20221215 gcr.io/tooljet-test-338806/postgrest/postgrest:v10.1.1.20221215
    docker push gcr.io/tooljet-test-338806/postgrest/postgrest:v10.1.1.20221215

    Please run the above command by launching googleCLI which will help to push the PostgREST image to Google container registry.

    CLI
  1. Once the PostgREST image is pushed. Click on create service.

    Select and add the pushed PostgREST image as shown in below.

    create-service-cloud-run-postgrest
  1. Ingress and Authentication can be set as shown below, to begin with. Feel free to change the security configurations as per you see fit.

    ingress-auth
  1. Under containers tab, please make sure the port is set 3000 and CPU capacity is set to 1GiB.

    port-and-capacity-postgrest
  2. Under environmental variable please add corresponding Tooljet database env variables. You can also refer env variable.

  3. Please go to connection tab. Under Cloud SQL instance please select the PostgreSQL database which you have set-up for Tooljet application or the separate PostgreSQL database created respective to Tooljet Database from the drop-down option.

Cloud-SQL-instance

Click on deploy once the above parameters are set.

信息

Once the Service is created and live, to make the Cloud Service URL public. Please follow the steps here to make the service public.

  1. Additional Environmental variable to be added to Tooljet application or Tooljet Server connect to PostgREST server. You can also refer env variable here
env-for-tooljet