Install/Update¶
Required packages¶
php-deploykit aims to use as few packages as possible beyond the coreutils included in most Linux distributions (for example cp, mv, and ls), but some packages are required:
- PHP(obviously)
- Composer
- git (if using the symlink deployment method or git pull in classical method)
- Node.js/npm (if using the npm related step in the deployment script)
- rsync (used for migration to symlink method)
- SSH (if you clone the repository using SSH, otherwise it is not required)
- python3 (currently the webhook server is written in python)
All scripts use /bin/bash and /usr/bin/env python3; make sure they are present
Installation steps¶
- Install the required packages listed above
- Clone the latest version of the repository using the following command:
- Ensure run.sh is executable, in the directory where you cloned the repository, run:
- If you want to install php-deploykit globally, run the following from the parent directory of php-deploykit (do not run this inside the php-deploykit directory). Replace the target path or name as desired.
From now on, when instructed to "run php-deploykit", execute the run.sh script from its installation location. If you created a symlink into PATH, you can run php-deploykit (or the name you chose). Otherwise run the script using the full path to the run.sh file.
# If you have more than one app, you may want to move it to something else, eg. # sudo cp -r php-deploykit /opt/php-deploykit-app # sudo ln -s /opt/php-deploykit-app/run.sh /usr/local/bin/php-deploykit-app # move code sudo cp -r php-deploykit /opt/php-deploykit # create symlink of run.sh into PATH sudo ln -s /opt/php-deploykit/run.sh /usr/local/bin/php-deploykit
Update steps¶
To update php-deploykit, simply pull the latest changes from the repository. If you installed it globally, make sure to pull the changes in the installation directory (eg. /opt/php-deploykit if you followed the example above). If you did not install it globally, pull the changes in the directory where you cloned the repository.