• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Need help on /opt/plesk/php/7.2/bin/php /usr/lib/plesk-9.0/composer.phar install

abryan

New Pleskian
I can run /opt/plesk/php/7.2/bin/php /usr/lib/plesk-9.0/composer.phar install manually on the instance and it executes well.

I get a successful deployment (Bitbucket pipelines > Codedeploy > Ec2) however, I get error in the /opt/codedeploy-agent/deployment-root/(deployment-group-id)/(deployment-id)logs/scripts.log
2020-10-15 14:47:04 [stderr] The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly

after_install.sh

#!/bin/bash

# Copy source files to DEVELOPMENT environment
if [ "$DEPLOYMENT_GROUP_NAME" == "staging-deployment-group" ]; then
chown -R user:psacln /var/www/vhosts/example.com/code-deploy-temp
find /var/www/vhosts/example.com/code-deploy-temp -type f -not -name ".pl" -not -name ".cgi" -not -name "*.sh" -print0 | xargs -0 chmod 0644
find /var/www/vhosts/example.com/code-deploy-temp -type d -print0 | xargs -0 chmod 0755
shopt -s dotglob
rsync -avz /var/www/vhosts/example.com/code-deploy-temp/* /var/www/vhosts/example.com/staging.example.com/
rm -rf /var/www/vhosts/example.com/code-deploy-temp/*
cd /var/www/vhosts/example.com/staging.example.com/
/opt/plesk/php/7.2/bin/php /usr/lib/plesk-9.0/composer.phar install
fi
appspec.yml
version: 0.0
os: linux
files:
- source: /
destination: /var/www/vhosts/example.com/code-deploy-temp
hooks:
AfterInstall:
- location: scripts/after_install.sh
timeout: 300
2020-10-01 15:30:08 [stderr] [RuntimeException]
2020-10-01 15:30:08 [stderr] The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly

Seems to run fine in develop.

I manually run the (/opt/plesk/php/7.2/bin/php /usr/lib/plesk-9.0/composer.phar install) in their respective directories and seem to work fine.

OS
Ubuntu 16.04.7 LTS
Product
Plesk Obsidian
Version 18.0.2

Can anyone shed some light on this?
 
Last edited:
Back
Top