forked from ToolJet/ToolJet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f8fe20
commit f5ceec8
Showing
3 changed files
with
51 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM node:14.17.0-buster | ||
|
||
# Fix for JS heap limit allocation issue | ||
ENV NODE_OPTIONS="--max-old-space-size=2048" | ||
|
||
RUN apt update && apt install -y \ | ||
build-essential \ | ||
postgresql \ | ||
freetds-dev | ||
|
||
RUN mkdir -p /app | ||
WORKDIR /app | ||
ENV NODE_ENV=production | ||
|
||
# Building ToolJet server | ||
COPY ./server/package.json ./server/package-lock.json ./server/ | ||
RUN npm --prefix server install | ||
COPY ./server/ ./server/ | ||
RUN npm install -g @nestjs/cli | ||
RUN npm --prefix server run build | ||
|
||
COPY ./docker/ ./docker/ | ||
|
||
RUN ["chmod", "755", "./server/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,44 @@ | ||
--- | ||
sidebar_position: 4 | ||
sidebar_label: Kubernetes | ||
--- | ||
|
||
# Kubernetes | ||
# Deploying ToolJet on Kubernetes | ||
|
||
:::info | ||
You should setup a PostgreSQL database manually to be used by the ToolJet server. | ||
You should setup a PostgreSQL database manually to be used by ToolJet. | ||
::: | ||
|
||
Follow the steps below to deploy ToolJet server on a Kubernetes cluster. | ||
Follow the steps below to deploy ToolJet on a Kubernetes cluster. | ||
|
||
1. Setup a PostgreSQL database. | ||
1. Setup a PostgreSQL database | ||
ToolJet uses a postgres database as the persistent storage for storing data related to users and apps. We do not have plans to support other databases such as MySQL. | ||
|
||
2. Create a Kubernetes secret with name `server`. For the minimal setup, ToolJet requires `pg_host`, `pg_db`, `pg_user`, `pg_password`, `secret_key_base` & `lockbox_key` keys in the secret. ( Read [environment variables reference](/docs/deployment/env-vars) ) | ||
2. Create a Kubernetes secret with name `server`. For the minimal setup, ToolJet requires `pg_host`, `pg_db`, `pg_user`, `pg_password`, `secret_key_base` & `lockbox_key` keys in the secret. | ||
|
||
Read [environment variables reference](/docs/deployment/env-vars) | ||
|
||
3. Create a Kubernetes deployment | ||
|
||
```bash | ||
$ kubectl apply -f https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/kubernetes/server-deployment.yaml | ||
``` | ||
```bash | ||
$ kubectl apply -f https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/kubernetes/deployment.yaml | ||
``` | ||
|
||
:::info | ||
The file given above is just a template and might not suit production environments. You should download the file and configure parameters such as the replica count and environment variables according to your needs. | ||
::: | ||
:::info | ||
The file given above is just a template and might not suit production environments. You should download the file and configure parameters such as the replica count and environment variables according to your needs. | ||
::: | ||
|
||
4. Verify if the server is running | ||
4. Verify if ToolJet is running | ||
|
||
```bash | ||
$ kubectl get pods | ||
``` | ||
```bash | ||
$ kubectl get pods | ||
``` | ||
|
||
5. Create a Kubernetes services to publish the Kubernetes deployment that you've created. This step varies with cloud providers. We have a [template](https://raw.githubusercontent.com/ToolJet/ToolJet/main/deploy/kubernetes/server-service.yaml) for exposing the ToolJet server as a service using an AWS loadbalancer. | ||
Examples: | ||
Application load balancing on Amazon EKS: https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html | ||
GKE Ingress for HTTP(S) Load Balancing: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress | ||
:::tip | ||
Once the server is deployed, you can deploy ToolJet client on the provider of your choice. Please read the client deployment documentation [here](/docs/setup/client). | ||
If you want to serve ToolJet client from services such as Firebase or Netlify, please read the client deployment documentation [here](/docs/setup/client). | ||
::: |