When you use one system for different PHP projects then sooner or later you will need to set up different PHP version per project. One solution is to manually change PHP before switching to project. But this is boring… To have the right version of PHP without our interaction we can use php-fpm and set right php version directly in vhost. But how to automatically change PHP version on CLI ?
Continue readingCategory Archives: Deployment
Autocomplete for deployer in phpStorm
From https://github.com/deployphp/deployer/issues/742#issuecomment-237638384
- rename /usr/local/bin/dep to /usr/local/bin/depployer.phar
mv /usr/local/bin/dep /usr/local/bin/deployer.phar
- Make a symbolic link for convenience back to dep
ln -s /usr/local/bin/deployer.phar /usr/local/bin/dep
- Add /usr/local/bin to include path under PHPStorm -> Preferences -> Language & Frameworks -> PHP
Add deploy user for deployer
- Run this to add user “deploy” wiht home dir /deploy/
useradd -m deploy
- Run this to genereate ssh keys for “deploy” user
su deploy -c"ssh-keygen"
- Run this to add group “www-data” to user “deploy”
usermod -a -G www-data deploy
- Run this to check to what groups user “deploy” belongs to:
groups deploy
