ToolJet/server/scripts/preview.sh
Adish M 648cc2c247
Adding volume for render PR app (#12795)
* Adding volume for render PR app

* correction mountPath

* dummy PR for testing

* correction in mount path

* correction in mount path

* correction disk size

* correction disk size

* correction disk size

* correction disk size

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue

* postgres starting issue and volume issue fixed

* fix postgresql start up issue in ee edition

* fix postgresql start up in ee edition

* fix postgresql start up in ee edition

* fix postgresql start up in ee edition

* fix postgresql start up in ee edition

* fix postgresql start up in ee edition

* fix postgresql start up in ee edition

* clean up

* clean up

* fix EOF

* changed the instance spec for ee edition
2025-05-08 01:37:20 +05:30

22 lines
682 B
Bash

#!/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