mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 13:37:28 +00:00
* Cloud Blocker bugfixes (#13160) * fix * minor email fixes * settings menu fix * fixes * Bugfixes/whitelabelling apis (#13180) * white-labelling apis * removed consoles logs * reverts * fixes for white-labelling * fixes * reverted breadcrumb changes (#13194) * fixes for getting public sso configurations * fix for enable signup on cloud * Cloud Trial and Banners (#13182) * Cloud Blocker bugfixes (#13160) * fix * minor email fixes * settings menu fix * fixes * Cloud Trial and Banners * revert * initial commit * Added website onboarding APIs * moved ai onboarding controller to auth module * ee banners * fix --------- Co-authored-by: Rohan Lahori <64496391+rohanlahori@users.noreply.github.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com> * Bugfixes/minor UI fixes-CLoud (#13203) * Bugfixes/UI bugs platform 1 (#13205) * cleanup * Audit logs fix * gitignore changes * postgrest configs removed * removed unused import * improvements * fix * improved startup logs * Platform cypress fix (#13192) * Cloud Blocker bugfixes (#13160) * fix * minor email fixes * settings menu fix * fixes * Bugfixes/whitelabelling apis (#13180) * white-labelling apis * removed consoles logs * reverts * fixes for white-labelling * fixes * Cypress fix * reverted breadcrumb changes (#13194) * cypress fix * title fix * fixes for getting public sso configurations --------- Co-authored-by: Rohan Lahori <64496391+rohanlahori@users.noreply.github.com> Co-authored-by: gsmithun4 <gsmithun4@gmail.com> * deployment fix * added interfaces and permissions * Bugfixes/lts 3.6 branch 1 platform (#13238) * fix * Licensing Banners Fixes Cloud and EE (#13241) * design: Adds license buttons to header * Refactor header actions * Cloud Blocker bugfixes (#13160) * fix * minor email fixes * settings menu fix * fixes * subscription page * fix banners --------- Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com> Co-authored-by: Rohan Lahori <64496391+rohanlahori@users.noreply.github.com> * fix for public apps * fix * CE Instance Signup bug (#13254) * CE Instance Signup bug * improvement * fix * Add WEBSITE_SIGNUP_URL to deployment environment variables * Add WEBSITE_SIGNUP_URL to environment variables for deployment * Super admin banner fix (#13262) * Git Sync Fixes (#13249) * git-sync module changes * git sync fixes * added app resource guard * git-sync fixes * removed require feature * fix * review comment changes * ypress fix * App logo fix inside app builder * fix for subpath cache * fix (#13274) * platform-cypress-fix (#13271) * git sync fixes (#13277) * fix * Add data-cy for new components (#13289) --------- Co-authored-by: Rohan Lahori <64496391+rohanlahori@users.noreply.github.com> Co-authored-by: Rudhra Deep Biswas <98055396+rudeUltra@users.noreply.github.com> Co-authored-by: Ajith KV <ajith.jaban@gmail.com> Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com> Co-authored-by: rohanlahori <rohanlahori99@gmail.com> Co-authored-by: Adish M <adish.madhu@gmail.com> Co-authored-by: Rudra deep Biswas <rudra21ultra@gmail.com>
190 lines
6.9 KiB
Docker
190 lines
6.9 KiB
Docker
FROM node:22.15.1 AS builder
|
|
# Fix for JS heap limit allocation issue
|
|
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
|
|
|
RUN mkdir -p /app
|
|
|
|
WORKDIR /app
|
|
|
|
ARG CUSTOM_GITHUB_TOKEN
|
|
ARG BRANCH_NAME
|
|
|
|
# Clone and checkout the frontend repositorys
|
|
RUN git config --global url."https://x-access-token:${CUSTOM_GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
|
|
|
RUN git config --global http.version HTTP/1.1
|
|
RUN git config --global http.postBuffer 524288000
|
|
RUN git clone https://github.com/ToolJet/ToolJet.git .
|
|
|
|
# The branch name needs to be changed the branch with modularisation in CE repo
|
|
RUN git checkout ${BRANCH_NAME}
|
|
|
|
RUN git submodule update --init --recursive
|
|
|
|
# Checkout the same branch in submodules if it exists, otherwise stay on default branch
|
|
RUN git submodule foreach 'git checkout ${BRANCH_NAME}'
|
|
|
|
# Scripts for building
|
|
COPY ./package.json ./package.json
|
|
|
|
# Build plugins
|
|
COPY ./plugins/package.json ./plugins/package-lock.json ./plugins/
|
|
RUN npm --prefix plugins install
|
|
COPY ./plugins/ ./plugins/
|
|
RUN NODE_ENV=production npm --prefix plugins run build
|
|
RUN npm --prefix plugins prune --production
|
|
|
|
ENV TOOLJET_EDITION=ee
|
|
|
|
# Build frontend
|
|
COPY ./frontend/package.json ./frontend/package-lock.json ./frontend/
|
|
RUN npm --prefix frontend install
|
|
COPY ./frontend/ ./frontend/
|
|
RUN npm --prefix frontend run build --production
|
|
RUN npm --prefix frontend prune --production
|
|
|
|
ENV NODE_ENV=production
|
|
ENV TOOLJET_EDITION=ee
|
|
|
|
# Build 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 install -g copyfiles
|
|
RUN npm --prefix server run build
|
|
|
|
FROM node:22.15.1-bullseye
|
|
|
|
RUN apt-get update -yq \
|
|
&& apt-get install curl wget gnupg zip -yq \
|
|
&& apt-get install -yq build-essential \
|
|
&& apt -y install redis \
|
|
&& apt-get clean -y
|
|
|
|
# copy postgrest executable
|
|
COPY --from=postgrest/postgrest:v12.2.0 /bin/postgrest /bin
|
|
|
|
ENV NODE_ENV=production
|
|
ENV TOOLJET_EDITION=ee
|
|
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
|
RUN apt-get update && apt-get install -y freetds-dev libaio1 wget supervisor
|
|
|
|
# Install Instantclient Basic Light Oracle and Dependencies
|
|
WORKDIR /opt/oracle
|
|
RUN wget https://tooljet-plugins-production.s3.us-east-2.amazonaws.com/marketplace-assets/oracledb/instantclients/instantclient-basiclite-linuxx64.zip && \
|
|
wget https://tooljet-plugins-production.s3.us-east-2.amazonaws.com/marketplace-assets/oracledb/instantclients/instantclient-basiclite-linux.x64-11.2.0.4.0.zip && \
|
|
unzip instantclient-basiclite-linuxx64.zip && rm -f instantclient-basiclite-linuxx64.zip && \
|
|
unzip instantclient-basiclite-linux.x64-11.2.0.4.0.zip && rm -f instantclient-basiclite-linux.x64-11.2.0.4.0.zip && \
|
|
cd /opt/oracle/instantclient_21_10 && rm -f *jdbc* *occi* *mysql* *mql1* *ipc1* *jar uidrvci genezi adrci && \
|
|
cd /opt/oracle/instantclient_11_2 && rm -f *jdbc* *occi* *mysql* *mql1* *ipc1* *jar uidrvci genezi adrci && \
|
|
echo /opt/oracle/instantclient* > /etc/ld.so.conf.d/oracle-instantclient.conf && ldconfig
|
|
# Set the Instant Client library paths
|
|
ENV LD_LIBRARY_PATH="/opt/oracle/instantclient_11_2:/opt/oracle/instantclient_21_10:${LD_LIBRARY_PATH}"
|
|
|
|
WORKDIR /
|
|
|
|
# copy npm scripts
|
|
COPY --from=builder /app/package.json ./app/package.json
|
|
# copy plugins dependencies
|
|
COPY --from=builder /app/plugins/dist ./app/plugins/dist
|
|
COPY --from=builder /app/plugins/client.js ./app/plugins/client.js
|
|
COPY --from=builder /app/plugins/node_modules ./app/plugins/node_modules
|
|
COPY --from=builder /app/plugins/packages/common ./app/plugins/packages/common
|
|
COPY --from=builder /app/plugins/package.json ./app/plugins/package.json
|
|
# copy frontend build
|
|
COPY --from=builder /app/frontend/build ./app/frontend/build
|
|
# 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/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
|
|
COPY --from=builder /app/server/dist ./app/server/dist
|
|
|
|
WORKDIR /app
|
|
|
|
# Install PostgreSQL
|
|
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/ bullseye-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
|
|
RUN apt update && apt -y install postgresql-13 postgresql-client-13 supervisor --fix-missing
|
|
|
|
|
|
# Explicitly create PG main directory with correct ownership
|
|
RUN mkdir -p /var/lib/postgresql/13/main && \
|
|
chown -R postgres:postgres /var/lib/postgresql
|
|
|
|
RUN mkdir -p /var/log/supervisor /var/run/postgresql && \
|
|
chown -R postgres:postgres /var/run/postgresql /var/log/supervisor
|
|
|
|
# Remove existing data and create directory with proper ownership
|
|
RUN rm -rf /var/lib/postgresql/13/main && \
|
|
mkdir -p /var/lib/postgresql/13/main && \
|
|
chown -R postgres:postgres /var/lib/postgresql
|
|
|
|
# Initialize PostgreSQL
|
|
RUN su - postgres -c "/usr/lib/postgresql/13/bin/initdb -D /var/lib/postgresql/13/main"
|
|
|
|
# Configure Supervisor to manage PostgREST, ToolJet, and Redis
|
|
RUN echo "[supervisord] \n" \
|
|
"nodaemon=true \n" \
|
|
"user=root \n" \
|
|
"\n" \
|
|
"[program:redis] \n" \
|
|
"command=redis-server /etc/redis/redis.conf \n" \
|
|
"user=redis \n" \
|
|
"autostart=true \n" \
|
|
"autorestart=true \n" \
|
|
"stderr_logfile=/var/log/redis/redis-server.log \n" \
|
|
"stdout_logfile=/var/log/redis/redis-server.log \n" \
|
|
"\n" \
|
|
"[program:postgrest] \n" \
|
|
"command=/bin/postgrest \n" \
|
|
"autostart=true \n" \
|
|
"autorestart=true \n" \
|
|
"\n" \
|
|
"[program:tooljet] \n" \
|
|
"user=root \n" \
|
|
"command=/bin/bash -c '/app/server/scripts/boot.sh' \n" \
|
|
"autostart=true \n" \
|
|
"autorestart=true \n" \
|
|
"stderr_logfile=/dev/stdout \n" \
|
|
"stderr_logfile_maxbytes=0 \n" \
|
|
"stdout_logfile=/dev/stdout \n" \
|
|
"stdout_logfile_maxbytes=0 \n" | sed 's/ //' > /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
# ENV defaults
|
|
ENV TOOLJET_HOST=http://localhost \
|
|
PORT=3000 \
|
|
NODE_ENV=production \
|
|
LOCKBOX_MASTER_KEY=replace_with_lockbox_master_key \
|
|
SECRET_KEY_BASE=replace_with_secret_key_base \
|
|
PG_DB=tooljet_production \
|
|
PG_USER=postgres \
|
|
PG_PASS=postgres \
|
|
PG_HOST=localhost \
|
|
ENABLE_TOOLJET_DB=true \
|
|
TOOLJET_DB_HOST=localhost \
|
|
TOOLJET_DB_USER=postgres \
|
|
TOOLJET_DB_PASS=postgres \
|
|
TOOLJET_DB=tooljet_db \
|
|
PGRST_HOST=http://localhost:3001 \
|
|
PGRST_SERVER_PORT=3001 \
|
|
PGRST_DB_URI=postgres://postgres:postgres@localhost/tooljet_db \
|
|
PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj \
|
|
PGRST_DB_PRE_CONFIG=postgrest.pre_config \
|
|
REDIS_HOST=localhost \
|
|
REDIS_PORT=6379 \
|
|
REDIS_USER= \
|
|
REDIS_PASSWORD= \
|
|
ORM_LOGGING=true \
|
|
DEPLOYMENT_PLATFORM=docker:local \
|
|
HOME=/home/appuser \
|
|
TERM=xterm
|
|
|
|
|
|
RUN chmod +x ./server/scripts/preview.sh
|
|
# Set the entrypoint
|
|
ENTRYPOINT ["./server/scripts/preview.sh"]
|