• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Question Display log of commands in Deploy actions

topkat2

New Pleskian
Server operating system version
debian 20
Plesk version and microupdate number
18.0.43
Hi, is there a way to see the real time output of deploy actions please ?
In my case I need to run a sequence of npm commands on my nodejs project and it will be way easier to see output of the cli.

Thanks for your lights
 
My solution was to write it to a txt file and read that file (very hacky by the way XD). Here is my full deploy command:
Bash:
# BACKEND DEPLOY
export PATH=$PATH:/opt/plesk/node/16/bin && cd ./folder1 && rm -f  deploy.log &&  npm i >> deploy.log 2>> deploy.log && npm run build >> deploy.log 2>> deploy.log && npx pm2 stop ../pm2.preprod.config.js >> deploy.log 2>> deploy.log ; npx pm2 start ../pm2.preprod.config.js >> deploy.log 2>> deploy.log

# FRONTEND DEPLOY
export PATH=$PATH:/opt/plesk/node/16/bin && cd ./folder2 && rm -f  deploy.log && npm i >> deploy.log 2>> deploy.log && REACT_APP_NODE_ENV=preprod REACT_APP_PUBLIC_URL=https://XXX.com/ /opt/plesk/node/16/bin/npm run build:prod >> deploy.log 2>> deploy.log

The main bit here being `command >> deploy.log 2>> deploy.log`which write output on success or error command in a file.
Take me aware if you find anything cleaner. That's all I have for now..
 
i have written a small bash script that lives in the repro - and in the actions i just call it -
this way i get a live update if i reload the *log-file-page* in another browser tab...
(works only with *.txt files.....)

Bash:
# call from git additional deployment actions
# deployit.sh &>> ../app_deploy.txt

MYLOG="../app_deploy.txt"

# clear file..
echo "git deploy start" > $MYLOG
date --iso-8601='seconds' >> $MYLOG

echo "do your things:" &>> $MYLOG

echo "git deploy done." >> $MYLOG
date --iso-8601='seconds' >> $MYLOG

sunny greetings
stefan
 
Back
Top