Skip to main content

Docker Compose Installation

Retool does not recommend deploying to physical machines for team development and deployments. Consider deploying to a virtual machine such as AWS EC2, Azure VM, or GCP Compute Engine. VM hardware and operating systems are more standardized than virtual or physical machines, so they are more robust for production deployments.

The following example focuses on using Docker Desktop to more quickly deploy for demo purposes.

Requirements

To deploy Retool using Docker, you need:

  • A Retool license key, which you can obtain from my.retool.com or your Retool account manager.
  • A working installation of Docker desktop.

Self-hosted deployments also require the following:

  • OS Supported by Docker Desktop
  • 12GiB memory
  • 2x vCPUs
  • 60GiB storage.

Steps

Run the following command to download the installation.

curl -L -O https://github.com/tryretool/retool-onpremise/archive/master.zip \
&& unzip master.zip \
&& cd retool-onpremise-master

Run install.sh

Run install.sh to generate docker.env file in the retool-onpremise-master directory. Skip over the request for a domain name.

./install.sh
...
Please type your fully qualified domain below. Press enter to skip.

NOTE: During the install.sh setup, Docker Desktop will be found and thus does not need to be installed.

Edit the generated docker.env file and add Retool license key and uncomment the COOKIE_INSECURE=true setting. The COOKIE_INSECURE=true setting is uncommented to allow for http traffic. We will not be configuring SSL in this laboratory. Please get your license key from your partner manager or Retool administrator and update the License Key value.

## License key
LICENSE_KEY=EXPIRED-LICENSE-KEY-TRIAL

## Uncomment this line if HTTPS is not set up
COOKIE_INSECURE=true

Update the two Dockerfiles (Dockerfile and CodeExecutor.Dockerfile) to specify the image to install by replacing ENTER_VERSION_HERE with a tag from Docker Hub (e.g., 3.75.9-stable).

FROM tryretool/backend:3.75.17-stable

CMD ./docker_scripts/start_api.sh
FROM tryretool/code-executor-service:3.75.17-stable

CMD bash start.sh

Run Docker Compose

Startup docker compose using the following command.

docker compose up -d
[+] Running 24/11
✔ https-portal 9 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 7.4s
✔ retooldb-postgres 13 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 12.2s

Check what containers are running using the following command.

docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7d95225bf10d tryretool/https-portal:latest "/init" About a minute ago Up About a minute 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp retool-onpremise-master-https-portal-1
8623859093e9 retool-onpremise-master-api "docker-entrypoint.s..." About a minute ago Up About a minute 0.0.0.0:3000->3000/tcp, 3001-3002/tcp retool-onpremise-master-api-1
e0e34f1ed7d7 retool-onpremise-master-jobs-runner "docker-entrypoint.s..." About a minute ago Up About a minute 3000-3002/tcp retool-onpremise-master-jobs-runner-1
9e3faac4ddd2 postgres:11.13 "docker-entrypoint.s..." About a minute ago Up About a minute 5432/tcp retool-onpremise-master-postgres-1
917137ce6876 retool-onpremise-master-db-ssh-connector "docker-entrypoint.s..." About a minute ago Up About a minute 3000-3002/tcp retool-onpremise-master-db-ssh-connector-1
b88cb7147fc7 retool-onpremise-master-workflows-worker "docker-entrypoint.s..." About a minute ago Up About a minute 3000-3002/tcp retool-onpremise-master-workflows-worker-1
8df38799a7a0 retool-onpremise-master-db-connector "docker-entrypoint.s..." About a minute ago Up About a minute 3000-3002/tcp retool-onpremise-master-db-connector-1
10f7bf661b47 postgres:14.3 "docker-entrypoint.s..." About a minute ago Up About a minute 5432/tcp retool-onpremise-master-retooldb-postgres-1

In a browser use the following URL to access Retool, http://localhost:3000 :

NOTE: Some laptops may have a firewall preventing access to port 3000. If that is the case, edit the docker.env entry to the following:

DOMAINS=localhost -> http://api:3000

This will display the login screen:

Retool Login Screen
  • Login to Retool (if you have done so previously) or select Sign Up, specify an email, password and full name.

Configure Retool-hosted Temporal for Workflows

  • Go to the Retool Home screen and select Workflows:
Workflows Enable
  • Select Retool-managed Temporal > Enroll now.
Workflows Enable
  • This will then display steps that need to be completed. The first is to set the ENCRYPTION_KEY that was completed earlier in the installation in the docker.env. The second is to confirm that ports 443 and 7233 are open for Egress. The final step is to select an AWS region that Retool-hosted Temporal will run within (e.g., US West, Oregon (us-west-2) ).
  • Select Complete setup.
Configure Encryption, Egress, and Region

The following dialog will appear where it is attempting to initialize the namespace and verifying enqueue and will poll to provide updates on the status. Initially the status will have two red indicators:

Initialize Temporal
  • Eventually both should show green check marks and allow you to select Let's build. Select Let's build to access the Workflows IDE.
Completing Setup
  • Select Let's build to access Workflows.
Workflows

Cleanup of Retool Installation

The following step can be used to cleanup the Retool Platform Docker-Compose setup.

docker compose down  
[+] Running 13/13
✔ Container retool-onpremise-master-https-portal-1 Removed 3.7s
✔ Container retool-onpremise-master-api-1 Removed 10.9s
✔ Container retool-onpremise-master-db-ssh-connector-1 Removed 10.9s
✔ Container retool-on premise-master-jobs-runner-1 Removed 10.8s
✔ Container retool-onpremise-master-retooldb-postgres-1 Removed 0.3s
✔ Container retool-onpremise-master-db-connector-1 Removed 10.9s
✔ Container retool-onpremise-master-workflows-worker-1 Removed 10.9s
✔ Container retool-onpremise-master-postgres-1 Removed 0.3s
✔ Network retool-onpremise-master_backend-network Removed 0.2s
✔ Network retool-onpremise-master_db-ssh-connector-network Removed 0.2s
✔ Network retool-onpremise-master_workflows-network Removed 0.3s
✔ Network retool-onpremise-master_db-connector-network Removed 0.3s
✔ Network retool-onpremise-master_frontend-network Removed 0.1s