ToolJet/docker/preview.Dockerfile

94 lines
3.8 KiB
Text
Raw Normal View History

FROM node:18.18.2-buster AS builder
# Fix for JS heap limit allocation issue
ENV NODE_OPTIONS="--max-old-space-size=4096"
RUN mkdir -p /app
WORKDIR /app
# 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
# 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
# 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 --prefix server run build
2024-03-12 11:41:41 +00:00
FROM node:18.18.2-bullseye
# copy postgrest executable
Feature: Aggregate and group by functionality in TJDB (#10170) * Added no codition section when aggregates are not available * Added feature to add aggregate condition and display it accordingly * Added feature to change the aggregateFx option * Added feature to update column option in the aggregate * Added feature to delete the aggregate * Disabling the group by according to valid condition but without tooltip * Added flow for deleting aggregate * feat: migration and configuration changes to support aggregation in tooljet database * added functionality for join table operations * Dropdown styles * Showing section for aggregate dropdown for joinTable operation * Added gap in multiple aggregate conditions * Added table_id in aggregate condition * Added custom placeholder Adjusted width of add condition of aggregate * Refactored logic for disable group_by field Added tooltip when group by is disabled * Updated aggregateFx to aggFx and groupBy to group_by * feat: group_by and aggregate option in list rows * added table name for aggregate dropdown value in joinTable operation * Get the group by options * value of aggregate column dropdown in join table operation * Added error and success message for aggregate deletion * Spacing adjustments * Clear the unwanted code * Updated the stucture of aggregate * Updated the structure of group_by * Fix: Query builder breaking due to undefined values * feat: logic used to aggregate on joins * Removing async * fix: app is crashing * feat: statement timeout at database level and user session level configuration can be done for ToolJet database * Added min and max width to dropdown in tooljetdb query manager * Added description * Adding width as 80 percentage when description is not avaialable * New Postgrest change for render related to Aggregate (#10175) * New Postgrest change for render related to Aggregate and group by functionality * correction in PGRST_DB_ENABLE_AGGREGATE value * Adding the env variable PGRST_DB_PRE_CONFIG * Adding the new postgrest related env changes to CE specific files * fix: updated env variable naming for aggregates * Showing description at the bottom for aggregate fx * Fixing typo error * Showing tick mark on selected item in dropdown when isMulti is false * Updated requested changes * Showing some description when option is not focused or selected * Updated the component name to AggregateFilter * fix: updated env variable to enable aggregation in tooljet database * refactor: new wrapper to create migration connection for tooljet database * fix: custom error message for aggregation errors has been handled for list_rows operation * fix: code review fixes * fix: aggregate function validation typo is updated * fix: empty validation for Select and Aggregate fields * postgrest changes for cypress * removed PGRST_DB_ENABLE_AGGREGATE --------- Co-authored-by: Ganesh Kumar <ganesh8056234@gmail.com> Co-authored-by: Adish M <44204658+adishM98@users.noreply.github.com> Co-authored-by: Adish M <adish.madhu@gmail.com>
2024-07-01 09:08:31 +00:00
COPY --from=postgrest/postgrest:v12.2.0 /bin/postgrest /bin
ENV NODE_ENV=production
ENV NODE_OPTIONS="--max-old-space-size=4096"
RUN apt-get update && apt-get install -y postgresql-client 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 /
RUN mkdir -p /app /var/log/supervisor
COPY /deploy/docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# 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/entrypoint.sh ./app/server/entrypoint.sh
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
# ENV defaults
ENV TOOLJET_HOST=http://localhost:80 \
PGRST_HOST=http://localhost:3000 \
PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj \
TOOLJET_DB=tooljet_db \
ENABLE_TOOLJET_DB=true \
PORT=80 \
LOCKBOX_MASTER_KEY=replace_with_lockbox_master_key \
SECRET_KEY_BASE=replace_with_secret_key_base \
ORM_LOGGING=all \
TERM=xterm
CMD ["/usr/bin/supervisord"]