ToolJet/server/scripts/preview.sh
Parth 118188cb9e
Enhance: Abstract common OAuth component for OpenApi (#13809)
* refactor: Abstract common oauth component for openapi

* chore: comment out redis-server startup in preview script

* fix: update PostgreSQL version from 16 to 13 in Dockerfile

* fix: update PostgreSQL directory paths from version 16 to 13 in Dockerfile

* fix: edit button on encrypted fields

* fix: conditionally render dropdowns

* fix: Change helpertext for redirect uri in oauthwrapper

* fix: query response to display json

* fix: copywriting & optional chaining

* fix: handle client credentials correctly

---------

Co-authored-by: adishM98 Bot <adish.madhu@gmail.com>
2025-08-29 16:51:56 +05:30

24 lines
722 B
Bash

#!/bin/bash
set -e
# redis-server /etc/redis/redis.conf &
# 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