• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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