mirror of
https://github.com/meienberger/runtipi.git
synced 2024-10-04 15:47:45 +03:00
21 lines
410 B
Bash
21 lines
410 B
Bash
#!/bin/sh
|
|
|
|
# Start worker
|
|
cd /worker || exit
|
|
pm2 start index.js --name worker -- start
|
|
|
|
# Wait for http://localhost:5000/healthcheck to return OK
|
|
while true; do
|
|
if [ "$(curl -s http://localhost:5000/worker-api/healthcheck)" = "OK" ]; then
|
|
break
|
|
fi
|
|
sleep 1
|
|
done
|
|
|
|
# Start apps
|
|
cd /dashboard || exit
|
|
pm2 start npm --name dashboard -- run start
|
|
|
|
# Log apps realtime
|
|
pm2 logs --raw --lines 1000
|