• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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