Update start.sh
This commit is contained in:
parent
5c2b0fe8aa
commit
27d5d13ab0
23
start.sh
23
start.sh
@ -4,14 +4,14 @@ MISSKEY='/opt/misskey'
|
||||
FILE='/configured.txt'
|
||||
|
||||
postgres-check() {
|
||||
POSTGRES_CHECK=$(ps aux | grep -i logical | head -1)
|
||||
if [[ "$POSTGRES_CHECK" = *"replication"* ]]; then
|
||||
echo "Postgres is running!"
|
||||
else
|
||||
echo "Postgres is not in Running yet!"
|
||||
sleep 2
|
||||
postgres-check
|
||||
fi
|
||||
POSTGRES_CHECK=$(ps aux | grep -i logical | head -1)
|
||||
if [[ "$POSTGRES_CHECK" = *"replication"* ]]; then
|
||||
echo "Postgres is running!"
|
||||
else
|
||||
echo "Postgres is not in Running yet!"
|
||||
sleep 2
|
||||
postgres-check
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@ -22,13 +22,14 @@ redis-server --protected-mode no --daemonize yes
|
||||
sleep 30
|
||||
|
||||
if [ ! -f "$FILE" ]; then
|
||||
bash /opt/setup.sh
|
||||
touch /configured.txt
|
||||
bash /opt/setup.sh
|
||||
touch /configured.txt
|
||||
fi
|
||||
|
||||
su postgres -s $SHELL -lc "$PG_BIN/pg_ctl start -D $PG_DIR" &
|
||||
postgres-check
|
||||
nginx &
|
||||
|
||||
NODE_ENV=production npm start
|
||||
pnpm run migrate
|
||||
NODE_ENV=production pnpm run start
|
||||
tail -f /dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user