mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
Merge branch 'main' into fix/workspace-constants-mapping
This commit is contained in:
commit
da772699e4
22 changed files with 467 additions and 432 deletions
142
.github/workflows/cloud-frontend.yml
vendored
142
.github/workflows/cloud-frontend.yml
vendored
|
|
@ -4,72 +4,128 @@ on:
|
|||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch to deploy (must start with lts/)'
|
||||
description: 'Git branch to deploy (must start with "lts-", e.g., lts-3.6)'
|
||||
required: true
|
||||
default: 'lts/latest'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: ✅ Check user authorization
|
||||
run: |
|
||||
allowed_user1=${{ secrets.ALLOWED_USER1_USERNAME }}
|
||||
allowed_user2=${{ secrets.ALLOWED_USER2_USERNAME }}
|
||||
allowed_user3=${{ secrets.ALLOWED_USER3_USERNAME }}
|
||||
|
||||
# - name: Check authorization
|
||||
# run: |
|
||||
# allowed_user1=${{ secrets.ALLOWED_USER1_USERNAME }}
|
||||
# allowed_user2=${{ secrets.ALLOWED_USER2_USERNAME }}
|
||||
# allowed_user3=${{ secrets.ALLOWED_USER3_USERNAME }}
|
||||
if [[ "${{ github.actor }}" != "$allowed_user1" && \
|
||||
"${{ github.actor }}" != "$allowed_user2" && \
|
||||
"${{ github.actor }}" != "$allowed_user3" ]]; then
|
||||
echo "❌ User '${{ github.actor }}' is not authorized to trigger this workflow."
|
||||
exit 1
|
||||
else
|
||||
echo "✅ User '${{ github.actor }}' is authorized."
|
||||
fi
|
||||
|
||||
# if [[ "${{ github.actor }}" != "$allowed_user1" && \
|
||||
# "${{ github.actor }}" != "$allowed_user2" && \
|
||||
# "${{ github.actor }}" != "$allowed_user3" ]]; then
|
||||
# echo "❌ User '${{ github.actor }}' is not authorized to trigger this workflow."
|
||||
# exit 1
|
||||
# else
|
||||
# echo "✅ User '${{ github.actor }}' is authorized."
|
||||
# fi
|
||||
- name: 📥 Manual Git checkout with submodules
|
||||
run: |
|
||||
set -e
|
||||
|
||||
# - name: Validate branch prefix
|
||||
# run: |
|
||||
# if [[ "${{ github.event.inputs.branch }}" != lts/* ]]; then
|
||||
# echo "❌ Branch name must start with 'lts/'"
|
||||
# exit 1
|
||||
# fi
|
||||
BRANCH="${{ github.event.inputs.branch }}"
|
||||
REPO="https://x-access-token:${{ secrets.CUSTOM_GITHUB_TOKEN }}@github.com/${{ github.repository }}"
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch }}
|
||||
git config --global url."https://x-access-token:${{ secrets.CUSTOM_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
|
||||
git config --global http.version HTTP/1.1
|
||||
git config --global http.postBuffer 524288000
|
||||
|
||||
- name: Setup Node.js
|
||||
echo "👉 Cloning $REPO (branch: $BRANCH)"
|
||||
git clone --recurse-submodules --depth=1 --branch "$BRANCH" "$REPO" repo
|
||||
cd repo
|
||||
|
||||
echo "🔁 Updating submodules"
|
||||
git submodule update --init --recursive
|
||||
|
||||
echo "🔀 Attempting to checkout '$BRANCH' in each submodule and validating"
|
||||
|
||||
BRANCH="$BRANCH" git submodule foreach --recursive bash -c '
|
||||
name="$sm_path"
|
||||
echo ""
|
||||
echo "Entering '\''$name'\''"
|
||||
echo "↪ $name: trying to checkout branch '\''$BRANCH'\''"
|
||||
|
||||
if git ls-remote --exit-code --heads origin "$BRANCH" >/dev/null; then
|
||||
git fetch origin "$BRANCH:$BRANCH" || {
|
||||
echo "❌ $name: fetch failed for $BRANCH"
|
||||
exit 1
|
||||
}
|
||||
|
||||
PREV=$(git rev-parse --short HEAD || echo "unknown")
|
||||
git checkout "$BRANCH" || {
|
||||
echo "❌ $name: checkout failed for $BRANCH"
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "Previous HEAD position was $PREV: $(git log -1 --pretty=%s || echo 'unknown')"
|
||||
echo "✅ $name: checked out branch $BRANCH"
|
||||
else
|
||||
echo "⚠️ $name: branch '$BRANCH' not found on origin. Falling back to 'main'"
|
||||
PREV=$(git rev-parse --short HEAD || echo "unknown")
|
||||
git checkout main && git pull origin main || {
|
||||
echo "❌ $name: fallback to main failed"
|
||||
exit 1
|
||||
}
|
||||
echo "Previous HEAD position was $PREV: $(git log -1 --pretty=%s || echo 'unknown')"
|
||||
echo "✅ $name: now on branch main"
|
||||
fi
|
||||
|
||||
CURRENT=$(git rev-parse --abbrev-ref HEAD)
|
||||
echo "🔎 $name: current branch = $CURRENT"
|
||||
if [ "$CURRENT" != "$BRANCH" ] && [ "$CURRENT" != "main" ]; then
|
||||
echo "❌ $name: unexpected branch state — wanted '$BRANCH' or fallback 'main', got '$CURRENT'"
|
||||
exit 1
|
||||
fi
|
||||
'
|
||||
|
||||
- name: 🧰 Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 22.15.1
|
||||
|
||||
- name: Install dependencies
|
||||
- name: 📦 Install dependencies
|
||||
run: npm install
|
||||
working-directory: repo
|
||||
|
||||
- name: Build the project
|
||||
- name: 🛠️ Build the project
|
||||
run: npm run build:plugins:prod && npm run build:frontend
|
||||
working-directory: repo
|
||||
env:
|
||||
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
|
||||
NODE_ENV: ${{ secrets.NODE_ENV }}
|
||||
NODE_OPTIONS: ${{ secrets.NODE_OPTIONS }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
SERVE_CLIENT: ${{ secrets.SERVE_CLIENT }}
|
||||
SERVER_IP: ${{ secrets.SERVER_IP }}
|
||||
TJDB_SQL_MODE_DISABLE: ${{ secrets.TJDB_SQL_MODE_DISABLE }}
|
||||
TOOLJET_SERVER_URL: ${{ secrets.TOOLJET_SERVER_URL }}
|
||||
GOOGLE_MAPS_API_KEY: ${{ secrets.CLOUD_GOOGLE_MAPS_API_KEY }}
|
||||
NODE_ENV: ${{ secrets.CLOUD_NODE_ENV }}
|
||||
NODE_OPTIONS: ${{ secrets.CLOUD_NODE_OPTIONS }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.CLOUD_SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.CLOUD_SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.CLOUD_SENTRY_PROJECT }}
|
||||
SERVE_CLIENT: ${{ secrets.CLOUD_SERVE_CLIENT }}
|
||||
SERVER_IP: ${{ secrets.CLOUD_SERVER_IP }}
|
||||
TJDB_SQL_MODE_DISABLE: ${{ secrets.CLOUD_TJDB_SQL_MODE_DISABLE }}
|
||||
TOOLJET_SERVER_URL: ${{ secrets.CLOUD_TOOLJET_SERVER_URL }}
|
||||
TOOLJET_EDITION: cloud
|
||||
|
||||
- name: Deploy to Netlify
|
||||
- name: 🚀 Deploy to Netlify
|
||||
run: |
|
||||
npm install -g netlify-cli
|
||||
netlify deploy --prod --dir=frontend/build --auth=$NETLIFY_AUTH_TOKEN --site=${{ secrets.CLOUD_NETLIFY_SITE_ID }}
|
||||
working-directory: repo
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
|
||||
- name: ✅ Deployment complete
|
||||
run: echo "🎉 Deployment to Netlify successful for branch ${{ github.event.inputs.branch }} by ${{ github.actor }}"
|
||||
GOOGLE_MAPS_API_KEY: ${{ secrets.CLOUD_GOOGLE_MAPS_API_KEY }}
|
||||
NODE_ENV: ${{ secrets.CLOUD_NODE_ENV }}
|
||||
NODE_OPTIONS: ${{ secrets.CLOUD_NODE_OPTIONS }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.CLOUD_SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.CLOUD_SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.CLOUD_SENTRY_PROJECT }}
|
||||
SERVE_CLIENT: ${{ secrets.CLOUD_SERVE_CLIENT }}
|
||||
SERVER_IP: ${{ secrets.CLOUD_SERVER_IP }}
|
||||
TJDB_SQL_MODE_DISABLE: ${{ secrets.CLOUD_TJDB_SQL_MODE_DISABLE }}
|
||||
TOOLJET_SERVER_URL: ${{ secrets.CLOUD_TOOLJET_SERVER_URL }}
|
||||
TOOLJET_EDITION: cloud
|
||||
|
|
|
|||
107
.github/workflows/docker-release.yml
vendored
107
.github/workflows/docker-release.yml
vendored
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
if: "contains(github.event.release.tag_name, '-ce-lts')"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: refs/heads/lts-4.0
|
||||
ref: refs/heads/lts-3.6
|
||||
|
||||
# Create Docker Buildx builder with platform configuration
|
||||
- name: Set up Docker Buildx
|
||||
|
|
@ -99,7 +99,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout code to main for pre-release EE edition
|
||||
if: "!contains(github.event.release.tag_name, 'ee-lts')"
|
||||
if: "!contains(github.event.release.tag_name, '-lts')"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: refs/heads/main
|
||||
|
|
@ -108,7 +108,7 @@ jobs:
|
|||
if: "contains(github.event.release.tag_name, '-ee-lts')"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: refs/heads/lts-4.0
|
||||
ref: refs/heads/lts-3.6
|
||||
|
||||
# Create Docker Buildx builder with platform configuration
|
||||
- name: Set up Docker Buildx
|
||||
|
|
@ -148,7 +148,6 @@ jobs:
|
|||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
|
||||
- name: Build and Push Docker image for LTS tag
|
||||
if: "contains(github.event.release.tag_name, '-ee-lts')"
|
||||
uses: docker/build-push-action@v4
|
||||
|
|
@ -156,7 +155,7 @@ jobs:
|
|||
context: .
|
||||
build-args: |
|
||||
CUSTOM_GITHUB_TOKEN=${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
BRANCH_NAME=lts
|
||||
BRANCH_NAME=lts-3.6
|
||||
file: docker/ee/ee-production.Dockerfile
|
||||
push: true
|
||||
tags: tooljet/tooljet-ee:${{ github.event.release.tag_name }},tooljet/tooljet-ee:ee-lts-latest,tooljet/tooljet:ee-lts-latest,tooljet/tooljet:${{ github.event.release.tag_name }}
|
||||
|
|
@ -176,64 +175,64 @@ jobs:
|
|||
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
|
||||
|
||||
# commented out for now, since cloud modularisation is not yet ready
|
||||
build-tooljet-image-for-cloud-edtion:
|
||||
|
||||
# build-tooljet-image-for-cloud-edtion:
|
||||
runs-on: ubuntu-latest
|
||||
if: "${{ github.event.release }}"
|
||||
|
||||
# runs-on: ubuntu-latest
|
||||
# if: "${{ github.event.release }}"
|
||||
steps:
|
||||
- name: Checkout code to LTS for Cloud LTS edition
|
||||
if: "contains(github.event.release.tag_name, '-cloud-lts')"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: refs/heads/lts-3.6
|
||||
|
||||
# steps:
|
||||
# - name: Checkout code to LTS for Cloud LTS edition
|
||||
# if: "contains(github.event.release.tag_name, '-cloud-lts')"
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# ref: refs/heads/lts-4.0
|
||||
# Create Docker Buildx builder with platform configuration
|
||||
- name: Set up Docker Buildx
|
||||
run: |
|
||||
mkdir -p ~/.docker/cli-plugins
|
||||
curl -SL https://github.com/docker/buildx/releases/download/v0.11.0/buildx-v0.11.0.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx
|
||||
chmod a+x ~/.docker/cli-plugins/docker-buildx
|
||||
docker buildx create --name mybuilder --platform linux/arm64,linux/amd64,linux/amd64/v2,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
|
||||
docker buildx use mybuilder
|
||||
|
||||
# # Create Docker Buildx builder with platform configuration
|
||||
# - name: Set up Docker Buildx
|
||||
# run: |
|
||||
# mkdir -p ~/.docker/cli-plugins
|
||||
# curl -SL https://github.com/docker/buildx/releases/download/v0.11.0/buildx-v0.11.0.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx
|
||||
# chmod a+x ~/.docker/cli-plugins/docker-buildx
|
||||
# docker buildx create --name mybuilder --platform linux/arm64,linux/amd64,linux/amd64/v2,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
|
||||
# docker buildx use mybuilder
|
||||
- name: Set DOCKER_CLI_EXPERIMENTAL
|
||||
run: echo "DOCKER_CLI_EXPERIMENTAL=enabled" >> $GITHUB_ENV
|
||||
|
||||
# - name: Set DOCKER_CLI_EXPERIMENTAL
|
||||
# run: echo "DOCKER_CLI_EXPERIMENTAL=enabled" >> $GITHUB_ENV
|
||||
- name: use mybuilder buildx
|
||||
run: docker buildx use mybuilder
|
||||
|
||||
# - name: use mybuilder buildx
|
||||
# run: docker buildx use mybuilder
|
||||
- name: Docker Login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
# - name: Docker Login
|
||||
# uses: docker/login-action@v2
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build and Push Docker image for LTS tag
|
||||
if: "contains(github.event.release.tag_name, '-cloud-lts')"
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
build-args: |
|
||||
CUSTOM_GITHUB_TOKEN=${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
BRANCH_NAME=lts-3.6
|
||||
file: docker/cloud/cloud-server.Dockerfile
|
||||
push: true
|
||||
tags: tooljet/saas:${{ github.event.release.tag_name }}
|
||||
platforms: linux/amd64
|
||||
env:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
# - name: Build and Push Docker image for LTS tag
|
||||
# if: "contains(github.event.release.tag_name, '-cloud-lts')"
|
||||
# uses: docker/build-push-action@v4
|
||||
# with:
|
||||
# context: .
|
||||
# args: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
# file: docker/cloud/cloud-server.Dockerfile
|
||||
# push: true
|
||||
# tags: tooljet/saas:${{ github.event.release.tag_name }}
|
||||
# platforms: linux/amd64
|
||||
# env:
|
||||
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Send Slack Notification
|
||||
run: |
|
||||
if [[ "${{ job.status }}" == "success" ]]; then
|
||||
message="ToolJet cloud image published:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`"
|
||||
else
|
||||
message="Job '${{ env.JOB_NAME }}' failed! Image built:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`"
|
||||
fi
|
||||
|
||||
# - name: Send Slack Notification
|
||||
# run: |
|
||||
# if [[ "${{ job.status }}" == "success" ]]; then
|
||||
# message="ToolJet cloud image published:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`"
|
||||
# else
|
||||
# message="Job '${{ env.JOB_NAME }}' failed! Image built:\n\`tooljet/saas:${{ github.event.release.tag_name }}\`"
|
||||
# fi
|
||||
|
||||
# curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
|
||||
|
||||
try-tooljet-image-build:
|
||||
|
|
|
|||
4
.github/workflows/packer-build.yml
vendored
4
.github/workflows/packer-build.yml
vendored
|
|
@ -16,11 +16,11 @@ jobs:
|
|||
name: packer-ee
|
||||
|
||||
steps:
|
||||
- name: Checkout code to lts-4.0
|
||||
- name: Checkout code to lts-3.6 branch
|
||||
if: contains(github.event.release.tag_name, '-ee-lts')
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: refs/heads/lts-4.0
|
||||
ref: refs/heads/lts-3.6
|
||||
|
||||
- name: Setting tag
|
||||
if: "${{ github.event.inputs.version != '' }}"
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
# https://docs.tooljet.io/docs/setup/env-vars
|
||||
TOOLJET_HOST=__required__
|
||||
LOCKBOX_MASTER_KEY=__required__
|
||||
SECRET_KEY_BASE=__required__
|
||||
PG_USER=__required__
|
||||
PG_HOST=__required__
|
||||
PG_PASS=__required__
|
||||
PG_DB=tooljet_prod
|
||||
ORM_LOGGING=true
|
||||
NODE_ENV=production
|
||||
DEPLOYMENT_PLATFORM=ec2
|
||||
|
||||
# ToolJet Database
|
||||
TOOLJET_DB=tooljet_db
|
||||
TOOLJET_DB_USER=
|
||||
TOOLJET_DB_HOST=
|
||||
TOOLJET_DB_PASS=
|
||||
PGRST_HOST=localhost:3001
|
||||
PGRST_SERVER_PORT=3001
|
||||
PGRST_JWT_SECRET=
|
||||
PGRST_DB_URI=
|
||||
PGRST_DB_PRE_CONFIG=postgrest.pre_config
|
||||
|
||||
# Checks every 24 hours to see if a new version of ToolJet is available
|
||||
# (Enabled by default. Set 0 to disable)
|
||||
CHECK_FOR_UPDATES=
|
||||
|
||||
# Checks every 24 hours to update app telemetry data to ToolJet hub.
|
||||
# (Telemetry is enabled by default. Set value to true to disable.)
|
||||
# DISABLE_APP_TELEMETRY=false
|
||||
|
||||
GOOGLE_CLIENT_ID=
|
||||
GOOGLE_CLIENT_SECRET=
|
||||
|
||||
# EMAIL CONFIGURATION
|
||||
DEFAULT_FROM_EMAIL=hello@tooljet.io
|
||||
SMTP_USERNAME=
|
||||
SMTP_PASSWORD=
|
||||
SMTP_DOMAIN=
|
||||
SMTP_PORT=
|
||||
|
||||
# DISABLE USER SIGNUPS (true or false). Default: true
|
||||
DISABLE_SIGNUPS=
|
||||
|
||||
# OBSERVABILITY
|
||||
APM_VENDOR=
|
||||
SENTRY_DNS=
|
||||
SENTRY_DEBUG=
|
||||
|
||||
# FEATURE TOGGLE
|
||||
COMMENT_FEATURE_ENABLE=
|
||||
ENABLE_MULTIPLAYER_EDITING=true
|
||||
|
||||
#SSO
|
||||
SSO_DISABLE_SIGNUP=
|
||||
SSO_RESTRICTED_DOMAIN=
|
||||
SSO_GOOGLE_OAUTH2_CLIENT_ID=
|
||||
SSO_GIT_OAUTH2_CLIENT_ID=
|
||||
SSO_GIT_OAUTH2_CLIENT_SECRET=
|
||||
SSO_GIT_OAUTH2_HOST=
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
[Unit]
|
||||
Description=Nest Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=ubuntu
|
||||
|
||||
WorkingDirectory=/home/ubuntu/app
|
||||
Environment="NODE_ENV=production"
|
||||
EnvironmentFile=/home/ubuntu/app/.env
|
||||
RestartSec=1
|
||||
ExecStart=/usr/bin/npm --prefix /home/ubuntu/app run start:prod
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
[Unit]
|
||||
Description=PostgREST Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=ubuntu
|
||||
|
||||
WorkingDirectory=/bin
|
||||
EnvironmentFile=/home/ubuntu/app/.env
|
||||
RestartSec=1
|
||||
ExecStart=/bin/postgrest
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if grep __required__ .env
|
||||
then
|
||||
echo "Please set the required values within the .env file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export $(grep -v '^#' .env | xargs)
|
||||
|
||||
if psql -d postgresql://$PG_USER:$PG_PASS@$PG_HOST/postgres -c 'select now()' > /dev/null 2>&1
|
||||
then
|
||||
echo "Successfully pinged the database!";
|
||||
else
|
||||
echo "Can't connect to the database. Kindly check the credenials provided in the .env file!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if sudo systemctl start openresty
|
||||
then
|
||||
echo "Successfully started reverse proxy!"
|
||||
else
|
||||
echo "Failed to start reverse proxy"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if $ENABLE_TOOLJET_DB == "true"
|
||||
then
|
||||
if sudo systemctl start postgrest
|
||||
then
|
||||
echo "Successfully started PostgREST server!"
|
||||
else
|
||||
echo "Failed to start PostgREST server"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
TOOLJET_EDTION=ce npm --prefix server run db:setup:prod
|
||||
|
||||
if sudo systemctl start nest
|
||||
then
|
||||
echo "The app will be served at ${TOOLJET_HOST}"
|
||||
else
|
||||
echo "Failed to start the server!"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
# Setup prerequisite dependencies
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates apt-utils git curl postgresql-client
|
||||
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm install 22.15.1
|
||||
sudo ln -s "$(which node)" /usr/bin/node
|
||||
sudo ln -s "$(which npm)" /usr/bin/npm
|
||||
|
||||
sudo npm i -g npm@10.9.2
|
||||
|
||||
# Setup openresty
|
||||
wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
|
||||
echo "deb http://openresty.org/package/ubuntu bionic main" > openresty.list
|
||||
sudo mv openresty.list /etc/apt/sources.list.d/
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install --no-install-recommends openresty
|
||||
sudo apt-get install -y curl g++ gcc autoconf automake bison libc6-dev \
|
||||
libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool \
|
||||
libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev \
|
||||
libreadline-dev libssl-dev libmysqlclient-dev build-essential \
|
||||
freetds-dev libpq-dev
|
||||
sudo apt-get install -y luarocks
|
||||
sudo luarocks install lua-resty-auto-ssl
|
||||
sudo mkdir /etc/resty-auto-ssl /var/log/openresty /etc/fallback-certs
|
||||
sudo chown -R www-data:www-data /etc/resty-auto-ssl
|
||||
|
||||
# Oracle db client library setup
|
||||
sudo apt install -y libaio1
|
||||
curl -o instantclient-basiclite.zip https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip -SL && \
|
||||
curl -o instantclient-basiclite-11.zip https://tooljet-plugins-production.s3.us-east-2.amazonaws.com/marketplace-assets/oracledb/instantclients/instantclient-basiclite-linux.x64-11.2.0.4.0.zip -SL && \
|
||||
unzip instantclient-basiclite.zip && \
|
||||
unzip instantclient-basiclite-11.zip && \
|
||||
sudo mkdir -p /usr/lib/instantclient && sudo mv instantclient*/ /usr/lib/instantclient && \
|
||||
rm instantclient-basiclite.zip && \
|
||||
rm instantclient-basiclite-11.zip && \
|
||||
echo /usr/lib/instantclient/* | sudo tee /etc/ld.so.conf.d/oracle-instantclient.conf > /dev/null && sudo ldconfig
|
||||
# Set the Instant Client library paths
|
||||
export LD_LIBRARY_PATH="/usr/lib/instantclient/instantclient_11_2:/usr/lib/instantclient/instantclient_21_10${LD_LIBRARY_PATH}"
|
||||
|
||||
# Gen fallback certs
|
||||
sudo openssl rand -out /home/ubuntu/.rnd -hex 256
|
||||
sudo chown www-data:www-data /home/ubuntu/.rnd
|
||||
sudo openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \
|
||||
-subj '/CN=sni-support-required-for-valid-ssl' \
|
||||
-keyout /etc/fallback-certs/resty-auto-ssl-fallback.key \
|
||||
-out /etc/fallback-certs/resty-auto-ssl-fallback.crt
|
||||
|
||||
# Setup nginx config
|
||||
export SERVER_HOST="${SERVER_HOST:=localhost}"
|
||||
export SERVER_USER="${SERVER_USER:=www-data}"
|
||||
VARS_TO_SUBSTITUTE='$SERVER_HOST:$SERVER_USER'
|
||||
envsubst "${VARS_TO_SUBSTITUTE}" < /tmp/nginx.conf > /tmp/nginx-substituted.conf
|
||||
sudo cp /tmp/nginx-substituted.conf /usr/local/openresty/nginx/conf/nginx.conf
|
||||
|
||||
# Download and setup postgrest binary
|
||||
curl -OL https://github.com/PostgREST/postgrest/releases/download/v12.2.0/postgrest-v12.2.0-linux-static-x64.tar.xz
|
||||
tar xJf postgrest-v12.2.0-linux-static-x64.tar.xz
|
||||
sudo mv ./postgrest /bin/postgrest
|
||||
sudo rm postgrest-v12.2.0-linux-static-x64.tar.xz
|
||||
|
||||
# Setup app and postgrest as systemd service
|
||||
sudo cp /tmp/nest.service /lib/systemd/system/nest.service
|
||||
sudo cp /tmp/postgrest.service /lib/systemd/system/postgrest.service
|
||||
|
||||
# Setup app directory
|
||||
mkdir -p ~/app
|
||||
git clone -b main https://github.com/ToolJet/ToolJet.git ~/app && cd ~/app
|
||||
|
||||
|
||||
mv /tmp/.env ~/app/.env
|
||||
mv /tmp/setup_app ~/app/setup_app
|
||||
sudo chmod +x ~/app/setup_app
|
||||
|
||||
npm install -g npm@10.9.2
|
||||
|
||||
# Building ToolJet app
|
||||
npm install -g @nestjs/cli
|
||||
TOOLJET_EDTION=ce npm run build
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
packer {
|
||||
required_plugins {
|
||||
amazon = {
|
||||
version = ">= 0.0.1"
|
||||
source = "github.com/hashicorp/amazon"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
source "amazon-ebs" "ubuntu" {
|
||||
ami_name = "${var.ami_name}"
|
||||
instance_type = "${var.instance_type}"
|
||||
region = "${var.ami_region}"
|
||||
ami_regions = "${var.ami_regions}"
|
||||
ami_groups = "${var.ami_groups}"
|
||||
source_ami_filter {
|
||||
filters = {
|
||||
name = "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"
|
||||
root-device-type = "ebs"
|
||||
virtualization-type = "hvm"
|
||||
}
|
||||
most_recent = true
|
||||
owners = ["099720109477"]
|
||||
}
|
||||
ssh_username = "ubuntu"
|
||||
ssh_clear_authorized_keys = "true"
|
||||
}
|
||||
|
||||
|
||||
build {
|
||||
sources = [
|
||||
"source.amazon-ebs.ubuntu"
|
||||
]
|
||||
|
||||
provisioner "file" {
|
||||
source = "nest.service"
|
||||
destination = "/tmp/nest.service"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "../../frontend/config/nginx.conf.template"
|
||||
destination = "/tmp/nginx.conf"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = ".env"
|
||||
destination = "/tmp/.env"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "setup_app"
|
||||
destination = "/tmp/setup_app"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "postgrest.service"
|
||||
destination = "/tmp/postgrest.service"
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
script = "setup_machine.sh"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
variable "ami_name" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "instance_type" {
|
||||
type = string
|
||||
default = "t2.medium"
|
||||
}
|
||||
|
||||
variable "ami_region" {
|
||||
type = string
|
||||
default = "us-west-1"
|
||||
}
|
||||
|
||||
variable "ami_groups" {
|
||||
type = list(string)
|
||||
default = ["all"]
|
||||
}
|
||||
|
||||
variable "ami_regions" {
|
||||
type = list(string)
|
||||
default = ["us-west-1", "us-east-1", "us-east-2", "eu-west-2", "eu-central-1", "ap-northeast-1", "ap-southeast-1","ap-northeast-3", "ap-south-1", "ap-northeast-2", "ap-southeast-2", "ca-central-1", "eu-west-1", "eu-north-1", "sa-east-1", "ap-east-1"]
|
||||
}
|
||||
|
|
@ -161,6 +161,21 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$WORKFLOW_WORKER" == "true" ]]; then
|
||||
echo "WORKER is true. Running the worker..."
|
||||
npm run worker:prod &
|
||||
else
|
||||
echo "WORKER is not true. Skipping the worker execution."
|
||||
fi
|
||||
|
||||
if sudo systemctl start neo4j && sudo systemctl enable neo4j
|
||||
then
|
||||
echo "Successfully started Neo4j!"
|
||||
else
|
||||
echo "Failed to start and enable Neo4j"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TOOLJET_EDTION=ee npm --prefix server run db:setup:prod
|
||||
|
||||
if sudo -E systemctl start nest
|
||||
|
|
@ -172,4 +187,4 @@ else
|
|||
fi
|
||||
|
||||
sudo systemctl restart nest
|
||||
sudo -E systemctl restart postgrest
|
||||
sudo -E systemctl restart postgrest
|
||||
|
|
|
|||
|
|
@ -78,6 +78,28 @@ sudo cp /tmp/redis-server.service /lib/systemd/system/redis-server.service
|
|||
# Start and enable Redis service
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
|
||||
# Setup Neo4j with APOC plugin
|
||||
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
|
||||
echo "deb https://debian.neo4j.com stable 5" | sudo tee /etc/apt/sources.list.d/neo4j.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y neo4j=1:5.26.6
|
||||
sudo apt-mark hold neo4j
|
||||
|
||||
# Setup APOC plugin
|
||||
sudo mkdir -p /var/lib/neo4j/plugins
|
||||
sudo wget -P /var/lib/neo4j/plugins https://github.com/neo4j/apoc/releases/download/5.26.6/apoc-5.26.6-core.jar
|
||||
|
||||
# Update Neo4j config
|
||||
echo "dbms.security.procedures.unrestricted=apoc.*" | sudo tee -a /etc/neo4j/neo4j.conf
|
||||
echo "dbms.security.procedures.allowlist=apoc.*,algo.*,gds.*" | sudo tee -a /etc/neo4j/neo4j.conf
|
||||
echo "dbms.directories.plugins=/var/lib/neo4j/plugins" | sudo tee -a /etc/neo4j/neo4j.conf
|
||||
echo "dbms.security.auth_enabled=true" | sudo tee -a /etc/neo4j/neo4j.conf
|
||||
|
||||
# Clean up APT cache
|
||||
sudo apt-get clean
|
||||
sudo rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Setup app directory
|
||||
mkdir -p ~/app
|
||||
|
||||
|
|
@ -96,4 +118,4 @@ npm install -g npm@10.9.2
|
|||
|
||||
# Building ToolJet app
|
||||
npm install -g @nestjs/cli
|
||||
TOOLJET_EDTION=ee npm run build
|
||||
TOOLJET_EDTION=ee npm run build
|
||||
|
|
|
|||
|
|
@ -44,8 +44,10 @@ ENV NODE_ENV=production
|
|||
|
||||
# Building ToolJet server
|
||||
COPY ./server/package.json ./server/package-lock.json ./server/
|
||||
RUN npm --prefix server install --only=production
|
||||
RUN npm --prefix server install
|
||||
COPY ./server/ ./server/
|
||||
RUN npm install -g @nestjs/cli
|
||||
RUN npm install -g copyfiles
|
||||
RUN npm --prefix server run build
|
||||
|
||||
FROM debian:12
|
||||
|
|
@ -97,7 +99,7 @@ COPY --from=builder /app/plugins/package.json ./app/plugins/package.json
|
|||
# copy server build
|
||||
COPY --from=builder /app/server/package.json ./app/server/package.json
|
||||
COPY --from=builder /app/server/.version ./app/server/.version
|
||||
COPY --from=builder /app/server/keys ./app/server/keys
|
||||
COPY --from=builder /app/server/ee/keys ./app/server/ee/keys
|
||||
COPY --from=builder /app/server/node_modules ./app/server/node_modules
|
||||
COPY --from=builder /app/server/templates ./app/server/templates
|
||||
COPY --from=builder /app/server/scripts ./app/server/scripts
|
||||
|
|
|
|||
|
|
@ -3,6 +3,116 @@ set -e
|
|||
|
||||
echo "🚀 Starting Try ToolJet container initialization..."
|
||||
|
||||
# Neo4j configuration
|
||||
# ----------------------------------
|
||||
# Default Neo4j environment values
|
||||
# ----------------------------------
|
||||
export NEO4J_USER=${NEO4J_USER:-"neo4j"}
|
||||
export NEO4J_PASSWORD=${NEO4J_PASSWORD:-"appaqvyvRLbeukhFE"}
|
||||
export NEO4J_AUTH=${NEO4J_AUTH:-"neo4j/appaqvyvRLbeukhFE"}
|
||||
export NEO4J_URI=${NEO4J_URI:-"bolt://localhost:7687"}
|
||||
export NEO4J_PLUGINS=${NEO4J_PLUGINS:-'["apoc"]'}
|
||||
export NEO4J_AUTH
|
||||
|
||||
# Extract username and password from NEO4J_AUTH if set
|
||||
if [ -n "$NEO4J_AUTH" ]; then
|
||||
# Extract username and password from NEO4J_AUTH (format: username/password)
|
||||
NEO4J_USERNAME=$(echo "$NEO4J_AUTH" | cut -d'/' -f1)
|
||||
NEO4J_PASSWORD=$(echo "$NEO4J_AUTH" | cut -d'/' -f2)
|
||||
|
||||
# Export these for application use
|
||||
export NEO4J_USERNAME
|
||||
export NEO4J_PASSWORD
|
||||
|
||||
echo "Neo4j authentication configured with username: $NEO4J_USERNAME" >/dev/null 2>&1
|
||||
else
|
||||
echo "NEO4J_AUTH not set, using default authentication" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Check if Neo4j is already initialized and set password if necessary
|
||||
if [ "$NEO4J_AUTH" != "none" ] && [ -n "$NEO4J_PASSWORD" ]; then
|
||||
echo "Setting Neo4j initial password..." >/dev/null 2>&1
|
||||
|
||||
# Ensure Neo4j is not running before setting the initial password
|
||||
neo4j stop || true
|
||||
|
||||
# Set the initial password using the correct command format for Neo4j 5.x
|
||||
NEO4J_ADMIN_CMD=$(which neo4j-admin)
|
||||
NEO4J_VERSION=$(neo4j --version | grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+" | head -n 1)
|
||||
echo "Detected Neo4j version: $NEO4J_VERSION" >/dev/null 2>&1
|
||||
|
||||
# Use version-specific command format
|
||||
MAJOR_VERSION=$(echo $NEO4J_VERSION | cut -d. -f1)
|
||||
if [ "$MAJOR_VERSION" -ge "5" ]; then
|
||||
# For Neo4j 5.x and higher
|
||||
echo "Using Neo4j 5.x+ password command format" >/dev/null 2>&1
|
||||
$NEO4J_ADMIN_CMD dbms set-initial-password "$NEO4J_PASSWORD" --require-password-change=false >/dev/null 2>&1 || {
|
||||
echo "Warning: Could not set Neo4j password, it may already be set" >/dev/null 2>&1
|
||||
}
|
||||
else
|
||||
# For Neo4j 4.x and lower
|
||||
echo "Using Neo4j 4.x password command format" >/dev/null 2>&1
|
||||
$NEO4J_ADMIN_CMD set-initial-password "$NEO4J_PASSWORD" >/dev/null 2>&1 || {
|
||||
echo "Warning: Could not set Neo4j password, it may already be set" >/dev/null 2>&1
|
||||
}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update Neo4j configuration
|
||||
echo "Configuring Neo4j..." >/dev/null 2>&1
|
||||
cat > /etc/neo4j/neo4j.conf << EOF
|
||||
# Neo4j configuration
|
||||
dbms.security.auth_enabled=true
|
||||
server.bolt.enabled=true
|
||||
server.bolt.listen_address=0.0.0.0:7687
|
||||
server.directories.data=/var/lib/neo4j/data
|
||||
server.directories.logs=/var/log/neo4j
|
||||
initial.dbms.default_database=neo4j
|
||||
server.directories.plugins=/var/lib/neo4j/plugins
|
||||
server.directories.import=/var/lib/neo4j/import
|
||||
|
||||
# APOC Settings
|
||||
dbms.security.procedures.unrestricted=apoc.*
|
||||
dbms.security.procedures.allowlist=apoc.*,algo.*,gds.*
|
||||
EOF
|
||||
|
||||
if [ -w "$NEO4J_LOG_DIR" ]; then
|
||||
chmod -R 770 "$NEO4J_LOG_DIR" || echo "Warning: Could not set log directory permissions" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Start Neo4j
|
||||
echo "Starting Neo4j service..."
|
||||
neo4j console >/dev/null 2>&1 &
|
||||
|
||||
# Add a wait for Neo4j to be ready with more robust checking
|
||||
echo "Waiting for Neo4j to be ready..." >/dev/null 2>&1
|
||||
NEO4J_READY=false
|
||||
for i in {1..60}; do
|
||||
# First try standard status check
|
||||
if neo4j status >/dev/null 2>&1; then
|
||||
echo "Neo4j is ready 🚀"
|
||||
NEO4J_READY=true
|
||||
break
|
||||
fi
|
||||
|
||||
# Also try connecting to the bolt port as a fallback
|
||||
if command -v nc >/dev/null 2>&1; then
|
||||
if nc -z localhost 7687 >/dev/null 2>&1; then
|
||||
echo "Neo4j is ready (port 7687 is open)"
|
||||
NEO4J_READY=true
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Waiting for Neo4j to start... ($i/60)" >/dev/null 2>&1
|
||||
sleep 2
|
||||
done
|
||||
|
||||
if [ "$NEO4J_READY" = false ]; then
|
||||
echo "WARNING: Neo4j may not be fully started yet, but continuing..."
|
||||
fi
|
||||
|
||||
|
||||
# Configure PostgreSQL authentication
|
||||
echo "🔧 Configuring PostgreSQL authentication..."
|
||||
sed -i 's/^local\s\+all\s\+postgres\s\+\(peer\|md5\)/local all postgres trust/' /etc/postgresql/13/main/pg_hba.conf >/dev/null 2>&1
|
||||
|
|
|
|||
|
|
@ -3,6 +3,115 @@ set -e
|
|||
|
||||
echo "🚀 Starting Try ToolJet container initialization..."
|
||||
|
||||
# Neo4j configuration
|
||||
# ----------------------------------
|
||||
# Default Neo4j environment values
|
||||
# ----------------------------------
|
||||
export NEO4J_USER=${NEO4J_USER:-"neo4j"}
|
||||
export NEO4J_PASSWORD=${NEO4J_PASSWORD:-"appaqvyvRLbeukhFE"}
|
||||
export NEO4J_AUTH=${NEO4J_AUTH:-"neo4j/appaqvyvRLbeukhFE"}
|
||||
export NEO4J_URI=${NEO4J_URI:-"bolt://localhost:7687"}
|
||||
export NEO4J_PLUGINS=${NEO4J_PLUGINS:-'["apoc"]'}
|
||||
export NEO4J_AUTH
|
||||
|
||||
# Extract username and password from NEO4J_AUTH if set
|
||||
if [ -n "$NEO4J_AUTH" ]; then
|
||||
# Extract username and password from NEO4J_AUTH (format: username/password)
|
||||
NEO4J_USERNAME=$(echo "$NEO4J_AUTH" | cut -d'/' -f1)
|
||||
NEO4J_PASSWORD=$(echo "$NEO4J_AUTH" | cut -d'/' -f2)
|
||||
|
||||
# Export these for application use
|
||||
export NEO4J_USERNAME
|
||||
export NEO4J_PASSWORD
|
||||
|
||||
echo "Neo4j authentication configured with username: $NEO4J_USERNAME" >/dev/null 2>&1
|
||||
else
|
||||
echo "NEO4J_AUTH not set, using default authentication" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Check if Neo4j is already initialized and set password if necessary
|
||||
if [ "$NEO4J_AUTH" != "none" ] && [ -n "$NEO4J_PASSWORD" ]; then
|
||||
echo "Setting Neo4j initial password..." >/dev/null 2>&1
|
||||
|
||||
# Ensure Neo4j is not running before setting the initial password
|
||||
neo4j stop || true
|
||||
|
||||
# Set the initial password using the correct command format for Neo4j 5.x
|
||||
NEO4J_ADMIN_CMD=$(which neo4j-admin)
|
||||
NEO4J_VERSION=$(neo4j --version | grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+" | head -n 1)
|
||||
echo "Detected Neo4j version: $NEO4J_VERSION" >/dev/null 2>&1
|
||||
|
||||
# Use version-specific command format
|
||||
MAJOR_VERSION=$(echo $NEO4J_VERSION | cut -d. -f1)
|
||||
if [ "$MAJOR_VERSION" -ge "5" ]; then
|
||||
# For Neo4j 5.x and higher
|
||||
echo "Using Neo4j 5.x+ password command format" >/dev/null 2>&1
|
||||
$NEO4J_ADMIN_CMD dbms set-initial-password "$NEO4J_PASSWORD" --require-password-change=false >/dev/null 2>&1 || {
|
||||
echo "Warning: Could not set Neo4j password, it may already be set" >/dev/null 2>&1
|
||||
}
|
||||
else
|
||||
# For Neo4j 4.x and lower
|
||||
echo "Using Neo4j 4.x password command format" >/dev/null 2>&1
|
||||
$NEO4J_ADMIN_CMD set-initial-password "$NEO4J_PASSWORD" >/dev/null 2>&1 || {
|
||||
echo "Warning: Could not set Neo4j password, it may already be set" >/dev/null 2>&1
|
||||
}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update Neo4j configuration
|
||||
echo "Configuring Neo4j..." >/dev/null 2>&1
|
||||
cat > /etc/neo4j/neo4j.conf << EOF
|
||||
# Neo4j configuration
|
||||
dbms.security.auth_enabled=true
|
||||
server.bolt.enabled=true
|
||||
server.bolt.listen_address=0.0.0.0:7687
|
||||
server.directories.data=/var/lib/neo4j/data
|
||||
server.directories.logs=/var/log/neo4j
|
||||
initial.dbms.default_database=neo4j
|
||||
server.directories.plugins=/var/lib/neo4j/plugins
|
||||
server.directories.import=/var/lib/neo4j/import
|
||||
|
||||
# APOC Settings
|
||||
dbms.security.procedures.unrestricted=apoc.*
|
||||
dbms.security.procedures.allowlist=apoc.*,algo.*,gds.*
|
||||
EOF
|
||||
|
||||
if [ -w "$NEO4J_LOG_DIR" ]; then
|
||||
chmod -R 770 "$NEO4J_LOG_DIR" || echo "Warning: Could not set log directory permissions" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Start Neo4j
|
||||
echo "Starting Neo4j service..."
|
||||
neo4j console >/dev/null 2>&1 &
|
||||
|
||||
# Add a wait for Neo4j to be ready with more robust checking
|
||||
echo "Waiting for Neo4j to be ready..." >/dev/null 2>&1
|
||||
NEO4J_READY=false
|
||||
for i in {1..60}; do
|
||||
# First try standard status check
|
||||
if neo4j status >/dev/null 2>&1; then
|
||||
echo "Neo4j is ready 🚀"
|
||||
NEO4J_READY=true
|
||||
break
|
||||
fi
|
||||
|
||||
# Also try connecting to the bolt port as a fallback
|
||||
if command -v nc >/dev/null 2>&1; then
|
||||
if nc -z localhost 7687 >/dev/null 2>&1; then
|
||||
echo "Neo4j is ready (port 7687 is open)"
|
||||
NEO4J_READY=true
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Waiting for Neo4j to start... ($i/60)" >/dev/null 2>&1
|
||||
sleep 2
|
||||
done
|
||||
|
||||
if [ "$NEO4J_READY" = false ]; then
|
||||
echo "WARNING: Neo4j may not be fully started yet, but continuing..."
|
||||
fi
|
||||
|
||||
# Configure PostgreSQL authentication
|
||||
echo "🔧 Configuring PostgreSQL authentication..."
|
||||
sed -i 's/^local\s\+all\s\+postgres\s\+\(peer\|md5\)/local all postgres trust/' /etc/postgresql/13/main/pg_hba.conf >/dev/null 2>&1
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ COPY --from=postgrest/postgrest:v12.2.0 /bin/postgrest /bin
|
|||
# Install Postgres
|
||||
USER root
|
||||
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
||||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
|
||||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
|
||||
RUN echo "deb http://deb.debian.org/debian"
|
||||
RUN apt update && apt -y install postgresql-13 postgresql-client-13 supervisor
|
||||
USER postgres
|
||||
|
|
@ -52,6 +52,18 @@ RUN apt update && apt install -y gettext-base curl \
|
|||
COPY ./docker/ee/temporal-server.yaml /etc/temporal/temporal-server.template.yaml
|
||||
COPY ./docker/ee/temporal-ui-server.yaml /etc/temporal/temporal-ui-server.yaml
|
||||
|
||||
# Install Neo4j + APOC
|
||||
RUN wget -O - https://debian.neo4j.com/neotechnology.gpg.key | apt-key add - && \
|
||||
echo "deb https://debian.neo4j.com stable 5" > /etc/apt/sources.list.d/neo4j.list && \
|
||||
apt-get update && apt-get install -y neo4j=1:5.26.6 && apt-mark hold neo4j && \
|
||||
mkdir -p /var/lib/neo4j/plugins && \
|
||||
wget -P /var/lib/neo4j/plugins https://github.com/neo4j/apoc/releases/download/5.26.6/apoc-5.26.6-core.jar && \
|
||||
echo "dbms.security.procedures.unrestricted=apoc.*" >> /etc/neo4j/neo4j.conf && \
|
||||
echo "dbms.security.procedures.allowlist=apoc.*,algo.*,gds.*" >> /etc/neo4j/neo4j.conf && \
|
||||
echo "dbms.directories.plugins=/var/lib/neo4j/plugins" >> /etc/neo4j/neo4j.conf && \
|
||||
echo "dbms.security.auth_enabled=true" >> /etc/neo4j/neo4j.conf && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Configure Supervisor to manage PostgREST, ToolJet, and Redis
|
||||
RUN echo "[supervisord] \n" \
|
||||
"nodaemon=true \n" \
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ COPY --from=postgrest/postgrest:v12.2.0 /bin/postgrest /bin
|
|||
# Install Postgres
|
||||
USER root
|
||||
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
||||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
|
||||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
|
||||
RUN echo "deb http://deb.debian.org/debian"
|
||||
RUN apt update && apt -y install postgresql-13 postgresql-client-13 supervisor
|
||||
USER postgres
|
||||
|
|
@ -52,6 +52,18 @@ RUN apt update && apt install -y gettext-base curl \
|
|||
COPY ./docker/ee/temporal-server.yaml /etc/temporal/temporal-server.template.yaml
|
||||
COPY ./docker/ee/temporal-ui-server.yaml /etc/temporal/temporal-ui-server.yaml
|
||||
|
||||
# Install Neo4j + APOC
|
||||
RUN wget -O - https://debian.neo4j.com/neotechnology.gpg.key | apt-key add - && \
|
||||
echo "deb https://debian.neo4j.com stable 5" > /etc/apt/sources.list.d/neo4j.list && \
|
||||
apt-get update && apt-get install -y neo4j=1:5.26.6 && apt-mark hold neo4j && \
|
||||
mkdir -p /var/lib/neo4j/plugins && \
|
||||
wget -P /var/lib/neo4j/plugins https://github.com/neo4j/apoc/releases/download/5.26.6/apoc-5.26.6-core.jar && \
|
||||
echo "dbms.security.procedures.unrestricted=apoc.*" >> /etc/neo4j/neo4j.conf && \
|
||||
echo "dbms.security.procedures.allowlist=apoc.*,algo.*,gds.*" >> /etc/neo4j/neo4j.conf && \
|
||||
echo "dbms.directories.plugins=/var/lib/neo4j/plugins" >> /etc/neo4j/neo4j.conf && \
|
||||
echo "dbms.security.auth_enabled=true" >> /etc/neo4j/neo4j.conf && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Configure Supervisor to manage PostgREST, ToolJet, and Redis
|
||||
RUN echo "[supervisord] \n" \
|
||||
"nodaemon=true \n" \
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit aa521205455afd59e85762716a0012c1e44986e1
|
||||
Subproject commit 1a14db61e117145def63bf66e9225e049a2f5818
|
||||
|
|
@ -182,7 +182,7 @@ export const AppCanvas = ({ appId, isViewer = false, switchDarkMode, darkMode })
|
|||
)}
|
||||
style={canvasContainerStyles}
|
||||
>
|
||||
{showOnDesktop && (
|
||||
{showOnDesktop && appType !== 'module' && (
|
||||
<PagesSidebarNavigation
|
||||
showHeader={showHeader}
|
||||
isMobileDevice={currentLayout === 'mobile'}
|
||||
|
|
@ -202,6 +202,7 @@ export const AppCanvas = ({ appId, isViewer = false, switchDarkMode, darkMode })
|
|||
scrollbarWidth: 'none',
|
||||
overflow: 'auto',
|
||||
width: currentMode === 'view' ? `calc(100% - ${isViewerSidebarPinned ? '0px' : '0px'})` : '100%',
|
||||
...(appType === 'module' && isModuleMode && { height: 'inherit' }),
|
||||
}}
|
||||
className={`app-${appId} _tooljet-page-${getPageId()}`}
|
||||
>
|
||||
|
|
@ -213,7 +214,7 @@ export const AppCanvas = ({ appId, isViewer = false, switchDarkMode, darkMode })
|
|||
{environmentLoadingState !== 'loading' && (
|
||||
<div>
|
||||
<Container
|
||||
id="canvas"
|
||||
id={moduleId}
|
||||
gridWidth={gridWidth}
|
||||
canvasWidth={canvasWidth}
|
||||
canvasHeight={canvasHeight}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import Tooltip from 'react-bootstrap/Tooltip';
|
|||
import './rightSidebarToggle.scss';
|
||||
import SolidIcon from '@/_ui/Icon/SolidIcons';
|
||||
import { RIGHT_SIDE_BAR_TAB } from '@/AppBuilder/RightSideBar/rightSidebarConstants';
|
||||
import { useModuleContext } from '@/AppBuilder/_contexts/ModuleContext';
|
||||
import { SidebarItem } from './SidebarItem';
|
||||
|
||||
const RightSidebarToggle = ({ darkMode = false }) => {
|
||||
|
|
@ -13,6 +14,7 @@ const RightSidebarToggle = ({ darkMode = false }) => {
|
|||
(state) => [state.isRightSidebarOpen, state.setRightSidebarOpen],
|
||||
shallow
|
||||
);
|
||||
const { appType } = useModuleContext();
|
||||
const setActiveRightSideBarTab = useStore((state) => state.setActiveRightSideBarTab);
|
||||
const activeRightSideBarTab = useStore((state) => state.activeRightSideBarTab);
|
||||
const isRightSidebarPinned = useStore((state) => state.isRightSidebarPinned);
|
||||
|
|
@ -50,16 +52,18 @@ const RightSidebarToggle = ({ darkMode = false }) => {
|
|||
className={`left-sidebar-item left-sidebar-layout left-sidebar-inspector`}
|
||||
tip="Component properties"
|
||||
/>
|
||||
<SidebarItem
|
||||
selectedSidebarItem={activeRightSideBarTab === RIGHT_SIDE_BAR_TAB.PAGES}
|
||||
onClick={() => {
|
||||
handleToggle(RIGHT_SIDE_BAR_TAB.PAGES);
|
||||
}}
|
||||
darkMode={darkMode}
|
||||
icon="file01"
|
||||
className={`left-sidebar-item left-sidebar-layout left-sidebar-inspector`}
|
||||
tip="Page settings"
|
||||
/>
|
||||
{appType !== 'module' && (
|
||||
<SidebarItem
|
||||
selectedSidebarItem={activeRightSideBarTab === RIGHT_SIDE_BAR_TAB.PAGES}
|
||||
onClick={() => {
|
||||
handleToggle(RIGHT_SIDE_BAR_TAB.PAGES);
|
||||
}}
|
||||
darkMode={darkMode}
|
||||
icon="file01"
|
||||
className={`left-sidebar-item left-sidebar-layout left-sidebar-inspector`}
|
||||
tip="Page settings"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export const ModuleProvider = ({ moduleId, isModuleMode, appType, isModuleEditor
|
|||
export const useModuleContext = () => {
|
||||
const context = useContext(ModuleContext);
|
||||
if (!context) {
|
||||
throw new Error('useModuleContext must be used within a ModuleProvider');
|
||||
return { moduleId: 'canvas', isModuleMode: false, isModuleEditor: false };
|
||||
}
|
||||
return context;
|
||||
};
|
||||
|
|
@ -21,7 +21,7 @@ export const useModuleContext = () => {
|
|||
export const useModuleId = () => {
|
||||
const context = useContext(ModuleContext);
|
||||
if (!context) {
|
||||
throw new Error('useModuleId must be used within a ModuleProvider');
|
||||
return 'canvas';
|
||||
}
|
||||
|
||||
return context.moduleId;
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
command = "npm run build:plugins:prod && npm run build:frontend"
|
||||
|
||||
[template.environment]
|
||||
NODE_ENV = "production"
|
||||
NODE_VERSION = "14.17.3"
|
||||
NPM_VERSION = "7.20.0"
|
||||
NODE_ENV = "production"
|
||||
TOOLJET_EDITION = "cloud"
|
||||
NODE_VERSION = "22.15.1"
|
||||
NPM_VERSION = "10.9.2"
|
||||
|
||||
[[redirects]]
|
||||
from = "/*"
|
||||
to = "/"
|
||||
status = 200
|
||||
status = 200
|
||||
|
|
|
|||
Loading…
Reference in a new issue