• 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!
  • 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.

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