The deployment is triggered when something is pushed on deployment branch using codeship.
The server hosting the deployment runs the webapp using pm2 as suggested in this tutorial.
pm2 uses process.yml configuration file.
The hosting itself works with an nginx service forwarding the requests to the local web application.
Once you are listed in the project owners you can:
- see deployments history: Codeship dashboard
- manage deployment scripts Codeship administration page
The host needs to have read access on this reposit to download the deployment branch.
Add the ssh keys of the new host (the content of the file: ~/.ssh/id_rsa.pub) on the "Deploy keys section".
Before the first deployment, the reposit has to be downloaded and the deployment branch must be checkout.
git clone git@github.com:coderbunker/inventory-server.git
cd inventory-server
git checkout deployment
If you choose to use pm2 + nginx to monitor application, they have to be installed separately (their installation is not triggered by 'npm install').