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.
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 docker_setup to generate docker.env file in the retool-onpremise-master directory. Skip over the request for a domain name.
./docker_setup
...
Please type your fully qualified domain below. Press enter to skip.
NOTE: We are not using the docker-compose installation instructions for this laboratory as we are leveraging Docker Desktop that includes docker-compose. The following command allows us to start the process versus using the install.sh script that would be leveraged in a Cloud VM.
Edit the docker.env file and add Retool license key. 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
Edit the docker.env file and uncomment the COOKIE_INSECURE=true to allow for http traffic. We will not be configuring SSL in this laboratory.
## 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
).
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:
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 direct traffic to the https-portal container but will require you to accept a self-signed certificate.
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