• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Question Setting environment variables in subscriptions

campsjos

New Pleskian
Hi!
I deployed a Symfony 3 application using Git extension (I loved it) and then tried to install its dependencies trough Composer in Subscription > Applications > Scan > composer.json but it failed due to a environment variable issue (to build a Symfony application in production you need to run "export SYMFONY_ENV=prod" first. More info here).

Finally I needed to log in to the server via SSH in order to run this command and then run "composer install --no-dev".

So my question is: Is there any way to set up environment variables via the UI? If not, can I set those env vars for the plesk user via SSH in order to be able to update dependencies via the UI?

Thanks!
 
Last edited:
Only other thing is that this really only fails in the build scripts. Fortunately you can run scripts in a chrooted environment when git deploys. I've done a custom setup so that PHP7 is included in user's chrooted environments and essentially I can run the asset installs etc. on deployment. It is a pain when running the installs and updates though and it really should be an option.

I know the composer install scripts will not run in a chrooted environment, because I don't have that, so perhaps we can work out what user it's being run as and add the environment variable to a .bash_profile?
 
Back
Top