mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 00:48:25 +00:00
Merge branch 'main' into feat/steps-v2-alignment-style-improvement
This commit is contained in:
commit
34ee831f65
14 changed files with 172 additions and 61 deletions
26
.github/workflows/render-preview-deploy.yml
vendored
26
.github/workflows/render-preview-deploy.yml
vendored
|
|
@ -80,7 +80,7 @@ jobs:
|
|||
},
|
||||
{
|
||||
"key": "PG_USER",
|
||||
"value": "tooljet"
|
||||
"value": "postgres"
|
||||
},
|
||||
{
|
||||
"key": "PG_PASS",
|
||||
|
|
@ -100,7 +100,7 @@ jobs:
|
|||
},
|
||||
{
|
||||
"key": "TOOLJET_DB_USER",
|
||||
"value": "tooljet"
|
||||
"value": "postgres"
|
||||
},
|
||||
{
|
||||
"key": "TOOLJET_DB_PASS",
|
||||
|
|
@ -116,7 +116,7 @@ jobs:
|
|||
},
|
||||
{
|
||||
"key": "PGRST_DB_URI",
|
||||
"value": "postgres://tooljet:postgres@localhost/${{ env.PR_NUMBER }}-ce-tjdb"
|
||||
"value": "postgres://postgres:postgres@localhost/${{ env.PR_NUMBER }}-ce-tjdb"
|
||||
},
|
||||
{
|
||||
"key": "PGRST_HOST",
|
||||
|
|
@ -168,7 +168,11 @@ jobs:
|
|||
}
|
||||
],
|
||||
"serviceDetails": {
|
||||
"disk": null,
|
||||
"disk": {
|
||||
"name": "tooljet-ce-pr-${{ env.PR_NUMBER }}-postgresql",
|
||||
"mountPath": "/data",
|
||||
"sizeGB": 10
|
||||
},
|
||||
"env": "docker",
|
||||
"envSpecificDetails": {
|
||||
"dockerCommand": "",
|
||||
|
|
@ -420,7 +424,7 @@ jobs:
|
|||
},
|
||||
{
|
||||
"key": "PG_USER",
|
||||
"value": "tooljet"
|
||||
"value": "postgres"
|
||||
},
|
||||
{
|
||||
"key": "PG_PASS",
|
||||
|
|
@ -440,7 +444,7 @@ jobs:
|
|||
},
|
||||
{
|
||||
"key": "TOOLJET_DB_USER",
|
||||
"value": "tooljet"
|
||||
"value": "postgres"
|
||||
},
|
||||
{
|
||||
"key": "TOOLJET_DB_PASS",
|
||||
|
|
@ -456,7 +460,7 @@ jobs:
|
|||
},
|
||||
{
|
||||
"key": "PGRST_DB_URI",
|
||||
"value": "postgres://tooljet:postgres@localhost/${{ env.PR_NUMBER }}-ee-tjdb"
|
||||
"value": "postgres://postgres:postgres@localhost/${{ env.PR_NUMBER }}-ee-tjdb"
|
||||
},
|
||||
{
|
||||
"key": "PGRST_HOST",
|
||||
|
|
@ -536,7 +540,11 @@ jobs:
|
|||
}
|
||||
],
|
||||
"serviceDetails": {
|
||||
"disk": null,
|
||||
"disk": {
|
||||
"name": "tooljet-ee-pr-${{ env.PR_NUMBER }}-postgresql",
|
||||
"mountPath": "/data",
|
||||
"sizeGB": 10
|
||||
},
|
||||
"env": "docker",
|
||||
"envSpecificDetails": {
|
||||
"dockerCommand": "",
|
||||
|
|
@ -549,7 +557,7 @@ jobs:
|
|||
"port": 80,
|
||||
"protocol": "TCP"
|
||||
}],
|
||||
"plan": "starter",
|
||||
"plan": "standard",
|
||||
"pullRequestPreviewsEnabled": "no",
|
||||
"region": "oregon",
|
||||
"url": "https://tooljet-ee-pr-${{ env.PR_NUMBER }}.onrender.com"
|
||||
|
|
|
|||
|
|
@ -689,7 +689,7 @@ Cypress.Commands.add(
|
|||
name: dataSourceName,
|
||||
options: [
|
||||
{ key: "connection_type", value: "manual", encrypted: false },
|
||||
{ key: "host", value: "35.238.9.114" },
|
||||
{ key: "host", value: "9.234.17.31" },
|
||||
{ key: "port", value: 5432 },
|
||||
{ key: "database", value: "student" },
|
||||
{ key: "username", value: "postgres" },
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ describe("Workspace constants", () => {
|
|||
addNewconstants("restapiHeaderKey", "customHeader");
|
||||
addNewconstants("restapiHeaderValue", "key=value");
|
||||
addNewconstants("deleteConst", "deleteconst");
|
||||
addNewconstants("gconst", "236");
|
||||
addNewconstants("gconstUrl", "http://34.66.166.236:4000/");
|
||||
addNewconstants("gconst", "108");
|
||||
addNewconstants("gconstUrl", "http://20.29.40.108:4000/");
|
||||
addNewconstants("gconstEndpoint", "production");
|
||||
|
||||
// create secret constants
|
||||
|
|
@ -118,6 +118,7 @@ describe("Workspace constants", () => {
|
|||
|
||||
//Verify all static and datasource queries output in components
|
||||
for (let i = 3; i <= 16; i++) {
|
||||
cy.log("Verifying textinput" + i);
|
||||
cy.get(commonWidgetSelector.draggableWidget(`textinput${i}`))
|
||||
.verifyVisibleElement("have.value", "Production environment testing");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,14 +78,16 @@ describe("Manage Groups", () => {
|
|||
cy.createApp(data.appName);
|
||||
cy.verifyToastMessage(
|
||||
commonSelectors.toastMessage,
|
||||
commonText.appCreatedToast
|
||||
commonText.appCreatedToast,
|
||||
false
|
||||
);
|
||||
cy.backToApps();
|
||||
|
||||
cy.deleteApp(data.appName);
|
||||
cy.verifyToastMessage(
|
||||
commonSelectors.toastMessage,
|
||||
commonText.appDeletedToast
|
||||
commonText.appDeletedToast,
|
||||
false
|
||||
);
|
||||
|
||||
// Folder operations
|
||||
|
|
@ -115,7 +117,8 @@ describe("Manage Groups", () => {
|
|||
cy.get(commonSelectors.cloneAppButton).click();
|
||||
cy.verifyToastMessage(
|
||||
commonSelectors.toastMessage,
|
||||
dashboardText.appClonedToast
|
||||
dashboardText.appClonedToast,
|
||||
false
|
||||
);
|
||||
// cy.get(commonSelectors.cancelButton).click();
|
||||
cy.apiLogout();
|
||||
|
|
@ -177,14 +180,16 @@ describe("Manage Groups", () => {
|
|||
cy.createApp(data.appName);
|
||||
cy.verifyToastMessage(
|
||||
commonSelectors.toastMessage,
|
||||
commonText.appCreatedToast
|
||||
commonText.appCreatedToast,
|
||||
false
|
||||
);
|
||||
cy.backToApps();
|
||||
|
||||
cy.deleteApp(data.appName);
|
||||
cy.verifyToastMessage(
|
||||
commonSelectors.toastMessage,
|
||||
commonText.appDeletedToast
|
||||
commonText.appDeletedToast,
|
||||
false
|
||||
);
|
||||
|
||||
// Folder operations
|
||||
|
|
@ -2127,7 +2127,7 @@
|
|||
"encrypted": false
|
||||
},
|
||||
"host": {
|
||||
"value": "35.238.9.114",
|
||||
"value": "9.234.17.31",
|
||||
"encrypted": false
|
||||
},
|
||||
"port": {
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@
|
|||
"encrypted": false
|
||||
},
|
||||
"host": {
|
||||
"value": "35.238.9.114",
|
||||
"value": "9.234.17.31",
|
||||
"encrypted": false
|
||||
},
|
||||
"port": {
|
||||
|
|
|
|||
|
|
@ -1862,7 +1862,7 @@
|
|||
"encrypted": false
|
||||
},
|
||||
"host": {
|
||||
"value": "35.238.9.114",
|
||||
"value": "9.234.17.31",
|
||||
"encrypted": false
|
||||
},
|
||||
"port": {
|
||||
|
|
|
|||
|
|
@ -2766,7 +2766,7 @@
|
|||
"name": "restapiStaticUrlG",
|
||||
"options": {
|
||||
"method": "get",
|
||||
"url": "http://34.66.166.236:4000/{{constants.gconstEndpoint}}",
|
||||
"url": "http://20.29.40.108:4000/{{constants.gconstEndpoint}}",
|
||||
"url_params": [
|
||||
[
|
||||
"",
|
||||
|
|
@ -2814,7 +2814,7 @@
|
|||
"name": "restapiUrlS",
|
||||
"options": {
|
||||
"method": "get",
|
||||
"url": "http://34.66.166.236:4000/{{secrets.sconstEndpoint}}",
|
||||
"url": "http://20.29.40.108:4000/{{secrets.sconstEndpoint}}",
|
||||
"url_params": [
|
||||
[
|
||||
"",
|
||||
|
|
@ -2908,7 +2908,7 @@
|
|||
"name": "restapiUrlGS",
|
||||
"options": {
|
||||
"method": "get",
|
||||
"url": "http://34.66.166.{{constants.gconst}}{{secrets.sconst}}/production",
|
||||
"url": "http://20.29.40.{{constants.gconst}}{{secrets.sconst}}/production",
|
||||
"url_params": [
|
||||
[
|
||||
"",
|
||||
|
|
@ -3419,7 +3419,7 @@
|
|||
"environmentId": "dab04b8d-7d1a-468a-b219-b2e1d0169d8c",
|
||||
"options": {
|
||||
"url": {
|
||||
"value": "http://34.66.166.236:4000/{{constants.gconstEndpoint}}",
|
||||
"value": "http://20.29.40.108:4000/{{constants.gconstEndpoint}}",
|
||||
"encrypted": false
|
||||
},
|
||||
"auth_type": {
|
||||
|
|
@ -3540,7 +3540,7 @@
|
|||
"environmentId": "dab04b8d-7d1a-468a-b219-b2e1d0169d8c",
|
||||
"options": {
|
||||
"url": {
|
||||
"value": "http://34.66.166.236:4000/{{secrets.sconstEndpoint}}",
|
||||
"value": "http://20.29.40.108:4000/{{secrets.sconstEndpoint}}",
|
||||
"encrypted": false
|
||||
},
|
||||
"auth_type": {
|
||||
|
|
@ -3782,7 +3782,7 @@
|
|||
"environmentId": "dab04b8d-7d1a-468a-b219-b2e1d0169d8c",
|
||||
"options": {
|
||||
"url": {
|
||||
"value": "http://34.66.166.{{constants.gconst}}{{secrets.sconst}}/production",
|
||||
"value": "http://20.29.40.{{constants.gconst}}{{secrets.sconst}}/production",
|
||||
"encrypted": false
|
||||
},
|
||||
"auth_type": {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ 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
|
||||
RUN apt-get update && apt-get install -y freetds-dev libaio1 wget supervisor
|
||||
|
||||
# Install Instantclient Basic Light Oracle and Dependencies
|
||||
WORKDIR /opt/oracle
|
||||
|
|
@ -54,9 +54,6 @@ ENV LD_LIBRARY_PATH="/opt/oracle/instantclient_11_2:/opt/oracle/instantclient_21
|
|||
|
||||
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
|
||||
|
|
@ -77,32 +74,56 @@ 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 echo "deb http://deb.debian.org/debian"
|
||||
RUN apt update && apt -y install postgresql-13 postgresql-client-13 supervisor
|
||||
USER postgres
|
||||
RUN service postgresql start && \
|
||||
psql -c "create role tooljet with login superuser password 'postgres';"
|
||||
USER root
|
||||
|
||||
RUN mkdir -p /var/log/supervisor /var/run/postgresql && \
|
||||
chown -R postgres:postgres /var/run/postgresql /var/log/supervisor
|
||||
|
||||
# Explicitly create PG main directory with correct ownership
|
||||
RUN mkdir -p /var/lib/postgresql/13/main && \
|
||||
chown -R postgres:postgres /var/lib/postgresql
|
||||
|
||||
# Configure Supervisor to manage PostgREST, ToolJet, and Redis
|
||||
RUN echo "[supervisord] \n" \
|
||||
"nodaemon=true \n" \
|
||||
"user=root \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=80 \
|
||||
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=tooljet \
|
||||
PG_USER=postgres \
|
||||
PG_PASS=postgres \
|
||||
PG_HOST=localhost \
|
||||
ENABLE_TOOLJET_DB=true \
|
||||
TOOLJET_DB_HOST=localhost \
|
||||
TOOLJET_DB_USER=tooljet \
|
||||
TOOLJET_DB_USER=postgres \
|
||||
TOOLJET_DB_PASS=postgres \
|
||||
TOOLJET_DB=tooljet_db \
|
||||
PGRST_HOST=http://localhost:3000 \
|
||||
PGRST_DB_URI=postgres://tooljet:postgres@localhost/tooljet_db \
|
||||
PGRST_DB_URI=postgres://postgres:postgres@localhost/tooljet_db \
|
||||
PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj \
|
||||
PGRST_DB_PRE_CONFIG=postgrest.pre_config \
|
||||
ORM_LOGGING=true \
|
||||
|
|
@ -110,4 +131,7 @@ ENV TOOLJET_HOST=http://localhost \
|
|||
HOME=/home/appuser \
|
||||
TERM=xterm
|
||||
|
||||
CMD ["/usr/bin/supervisord"]
|
||||
|
||||
RUN chmod +x ./server/scripts/preview.sh
|
||||
# Set the entrypoint
|
||||
ENTRYPOINT ["./server/scripts/preview.sh"]
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ 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 postgresql-client freetds-dev libaio1 wget supervisor
|
||||
RUN apt-get update && apt-get install -y freetds-dev libaio1 wget supervisor
|
||||
|
||||
# Install Instantclient Basic Light Oracle and Dependencies
|
||||
WORKDIR /opt/oracle
|
||||
|
|
@ -82,9 +82,6 @@ ENV LD_LIBRARY_PATH="/opt/oracle/instantclient_11_2:/opt/oracle/instantclient_21
|
|||
|
||||
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
|
||||
|
|
@ -106,38 +103,65 @@ COPY --from=builder /app/server/dist ./app/server/dist
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
# ENV defaults
|
||||
# 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 echo "deb http://deb.debian.org/debian"
|
||||
RUN apt update && apt -y install postgresql-13 postgresql-client-13 supervisor
|
||||
USER postgres
|
||||
RUN service postgresql start && \
|
||||
psql -c "create role tooljet with login superuser password 'postgres';"
|
||||
USER root
|
||||
RUN apt update && apt -y install postgresql-13 postgresql-client-13 supervisor --fix-missing
|
||||
|
||||
# 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: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=80 \
|
||||
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=tooljet \
|
||||
PG_USER=postgres \
|
||||
PG_PASS=postgres \
|
||||
PG_HOST=localhost \
|
||||
ENABLE_TOOLJET_DB=true \
|
||||
TOOLJET_DB_HOST=localhost \
|
||||
TOOLJET_DB_USER=tooljet \
|
||||
TOOLJET_DB_USER=postgres \
|
||||
TOOLJET_DB_PASS=postgres \
|
||||
TOOLJET_DB=tooljet_db \
|
||||
PGRST_HOST=http://localhost:3000 \
|
||||
PGRST_DB_URI=postgres://tooljet:postgres@localhost/tooljet_db \
|
||||
PGRST_DB_URI=postgres://postgres:postgres@localhost/tooljet_db \
|
||||
PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj \
|
||||
PGRST_DB_PRE_CONFIG=postgrest.pre_config \
|
||||
ORM_LOGGING=true \
|
||||
DEPLOYMENT_PLATFORM=docker:local \
|
||||
REDIS_PASS= \
|
||||
HOME=/home/appuser \
|
||||
TERM=xterm
|
||||
|
||||
CMD ["/usr/bin/supervisord"]
|
||||
|
||||
RUN chmod +x ./server/scripts/preview.sh
|
||||
# Set the entrypoint
|
||||
ENTRYPOINT ["./server/scripts/preview.sh"]
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ const RunButton = ({ buttonLoadingState }) => {
|
|||
<ButtonComponent
|
||||
size="medium"
|
||||
variant="secondary"
|
||||
onClick={() => runQuery(selectedQuery?.id, selectedQuery?.name, undefined, 'edit', {}, true)}
|
||||
onClick={() => runQuery(selectedQuery?.id, selectedQuery?.name, undefined, 'edit', {}, true, undefined, true)}
|
||||
leadingIcon="play01"
|
||||
disabled={isInDraft}
|
||||
isLoading={isLoading}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@ export class EnforceNewBasicPlanLimits1742369617678 implements MigrationInterfac
|
|||
}
|
||||
const manager = queryRunner.manager;
|
||||
const nestApp = await NestFactory.createApplicationContext(await AppModule.register({ IS_GET_CONTEXT: true }));
|
||||
const { LicenseCountsService } = await import(`${await getImportPath(true, edition)}/licensing/services/count.service`);
|
||||
const { LicenseCountsService } = await import(
|
||||
`${await getImportPath(true, edition)}/licensing/services/count.service`
|
||||
);
|
||||
const licenseInitService = nestApp.get(LicenseInitService);
|
||||
|
||||
const { isValid } = await licenseInitService.initForMigration(manager);
|
||||
|
|
@ -170,6 +172,32 @@ export class EnforceNewBasicPlanLimits1742369617678 implements MigrationInterfac
|
|||
await manager.query(archiveViewersInstanceQuery);
|
||||
}
|
||||
}
|
||||
|
||||
const superAdminCountQuery = `
|
||||
SELECT COUNT(*) FROM users
|
||||
WHERE status = '${USER_STATUS.ACTIVE}' AND user_type = '${USER_TYPE.INSTANCE}'
|
||||
`;
|
||||
const superAdminCount = await manager.query(superAdminCountQuery);
|
||||
|
||||
if (superAdminCount === 0) {
|
||||
const superAdminsQuery = `
|
||||
SELECT * FROM users
|
||||
WHERE user_type = '${USER_TYPE.INSTANCE}'
|
||||
ORDER BY id ASC
|
||||
`;
|
||||
const superAdmins = await manager.query(superAdminsQuery);
|
||||
|
||||
if (superAdmins.length > 0) {
|
||||
const oneInstanceUser = superAdmins[0];
|
||||
console.log('Activating one instance user:', oneInstanceUser.id, oneInstanceUser.email);
|
||||
const activateUserQuery = `
|
||||
UPDATE users
|
||||
SET status = '${USER_STATUS.ACTIVE}'
|
||||
WHERE id = '${oneInstanceUser.id}'
|
||||
`;
|
||||
await manager.query(activateUserQuery);
|
||||
}
|
||||
}
|
||||
}
|
||||
await nestApp.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
service postgresql start
|
||||
|
||||
echo "
|
||||
_____ _ ___ _
|
||||
|_ _| | | |_ | | |
|
||||
|
|
@ -15,6 +13,7 @@ Everything you need to build internal tools!
|
|||
GitHub: https://github.com/ToolJet/ToolJet
|
||||
"
|
||||
|
||||
# Run setup
|
||||
npm run db:setup:prod
|
||||
npm run db:seed:prod
|
||||
npm run start:prod
|
||||
# Start ToolJet
|
||||
exec npm run start:prod
|
||||
|
|
|
|||
22
server/scripts/preview.sh
Normal file
22
server/scripts/preview.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Fix ownership and permissions
|
||||
chown -R postgres:postgres /var/lib/postgresql /var/run/postgresql
|
||||
chmod 0700 /var/lib/postgresql/13/main
|
||||
|
||||
# Initialize DB cluster if needed
|
||||
if [ ! -s "/var/lib/postgresql/13/main/PG_VERSION" ]; then
|
||||
echo "Initializing PostgreSQL..."
|
||||
su - postgres -c "/usr/lib/postgresql/13/bin/initdb -D /var/lib/postgresql/13/main"
|
||||
fi
|
||||
|
||||
# Start PostgreSQL
|
||||
echo "Starting PostgreSQL..."
|
||||
su - postgres -c "/usr/lib/postgresql/13/bin/pg_ctl -D /var/lib/postgresql/13/main -w start"
|
||||
|
||||
# Export the PORT variable to be used by the application
|
||||
export PORT=${PORT:-80}
|
||||
|
||||
# Start Supervisor
|
||||
exec supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||
Loading…
Reference in a new issue