Download the PHP package plasticstudio/ps-deployer without Composer
On this page you can find all versions of the php package plasticstudio/ps-deployer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download plasticstudio/ps-deployer
More information about plasticstudio/ps-deployer
Files in plasticstudio/ps-deployer
Package ps-deployer
Short Description This is the base module for deployer recipe - tailored for our setup on sitehost
License BSD-3-Clause
Homepage https://psdigital.co.nz
Informations about the package ps-deployer
ps-deployer
Quick access commands
dep deploy stage=uat
dep deploy stage=uat --branch=master
dep deploy stage=prod --tag=1.0.1
dep sitehost:prepare
dep sitehost:prepare:deploy stage=uat --branch=master
dep sitehost:backup
dep savefromremote:latest
dep savefromremote
dep savefromremote:db
dep savefromremote:assets
dep savefromremote:logs
dep loadtoremote:assets
Important
To keep normal set up - add to your docker file environment
- DEPLOYER_VERSION=6.8.0
Migrate from v6 to 7
- Make sure you are running the latest docker image (you can pull this from inside docker desktop). deployer 7 currently works with 8.1 and 8.0 docker images.
- Install the new module
composer require --dev PlasticStudio/ps-deployer
this now contains all the tasks that were present in the old deploy.php - Rename your
deploy.php
todeploy-backup.php
-
Create new
deploy.php
and add below new code all. - Open files side by side copying across all site specific variables such as user, host, and files paths
- After copying you can now delete your old
deploy-backup.php
-
NEW CONTAINER: If this is a new container then we will need to prepare sitehost
dep sitehost:prepare
This will delete public folder and have it ready for symlink Set up ssh key for you to copy Set up php default configEXISITING CONTAINER: If this is an existing container then we will need to prepare sitehost. You will want to keep the current path for deploying. Uncomment the below line in your deploy.php file.
//set('current_path', '/container/application/current');
UPGRADING CONTAINER: todo
- If this is an existing container then the final thing we will need to do is on your FIRST deployment, deploy by release_name. This will be the current release +1. To find our the current release, ssh into the container and check the releases folder.
New set up
composer require PlasticStudio/ps-deployer
Create a new deploy.php
file with the following contents and update where required:
Set up SiteHost ready for Deployer
todo follow guru card to set up, then you can run this command - this only needs to be run once
dep sitehost:prepare
This will:
- Delete public directory which is created on first creation of a Sitehost server, so we can use this path as a symlink
- Generates ssh key which you can copy to deployment keys on github project
- Create php default config
If you are doing a container upgrade on Sitehost then you will want to run this command immediately after
dep sitehost:prepare:deploy stage=uat --branch=master
This will update the config to the defaults and fix the symlink
Deployments
Deploying a site
It’s as easy as dep deploy
. This will give you the option of which host to deploy to and will get current git HEAD to deploy.
Database and assets
Make sure your deployer.php
paths are set up correctly
Make a new backup, then save both db and assets from remote
dep savefromremote:latest
Save both db and assets from remote
dep savefromremote
Saves the most recent backup i.e. previous nights DB
dep savefromremote:db
Saves the most recent backup i.e. previous nights Assets
dep savefromremote:assets
Makes a temporary copy of current live assets, rolls back to this if there is a transfer issue.
loadtoremote:assets
Docker
Deployer comes with ps docker image.
make sure to include - ~/.ssh:/tmp/.ssh:ro
as a mounted volume in the docker-compose.yml
Keep old version of