Skip to content

Commit 532b17a

Browse files
committed
Creating PROVISIONING.md file and moving deployment detailed descriptions in that file
1 parent 0951154 commit 532b17a

File tree

2 files changed

+36
-28
lines changed

2 files changed

+36
-28
lines changed

PROVISIONING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Current deployment method
2+
3+
The deployment is triggered when something is pushed on [deployment](https://github.com/coderbunker/inventory-server/tree/deployment) branch using [codeship](http://codeship.com/).
4+
5+
The server hosting the deployment runs the webapp using pm2 as suggested in [this tutorial](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04).
6+
7+
pm2 uses [process.yml](https://github.com/coderbunker/inventory-server/blob/deployment/process.yml) configuration file.
8+
9+
The hosting itself works with an nginx service forwarding the requests to the local web application.
10+
11+
12+
## Codeship administration
13+
Once you are listed in the [project owners](https://app.codeship.com/orgs/coderbunker/teams/owners) you can:
14+
* see deployments history: [Codeship dashboard](https://app.codeship.com/projects/261737)
15+
* manage deployment scripts [Codeship administration page](https://app.codeship.com/projects/261737/deployment_branches/187689)
16+
17+
18+
# How to prepare the host
19+
20+
#### Allow host's ssh keys to access this repository
21+
The host needs to have read access on this reposit to download the deployment branch.
22+
23+
Add the ssh keys of the new host (the content of the file: ~/.ssh/id_rsa.pub) on the "[Deploy keys section](https://github.com/coderbunker/inventory-server/settings/keys)".
24+
25+
Before the first deployment, the reposit has to be downloaded and the deployment branch must be checkout.
26+
27+
git clone [email protected]:coderbunker/inventory-server.git
28+
cd inventory-server
29+
git checkout deployment
30+
31+
#### Install hosting programs
32+
If you choose to use pm2 + nginx to monitor application, they have to be installed separately (their installation is not triggered by 'npm install').

README.md

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ http://127.0.0.1:1234/
1717
Try also
1818
http://127.0.0.1:1234/search
1919

20+
## Troobleshooting.
21+
If the application is not starting, check that if there is any application already using port 1234.
22+
It is also possible that the previous time that "inventory-server" had been lauched did not termniate properly and it is still holding the port.
23+
2024
# Other information:
2125
The content are stored on a google spreadsheet. You need permission to edit:
2226
https://docs.google.com/spreadsheets/d/1QHKa3vUpht7zRl_LEzl3BlUbolz3ZiL8yKHzdBL42dY/edit
@@ -28,34 +32,6 @@ The website is published on the domain name url.coderbunker.com
2832

2933
The deployment is automatically triggered when something is pushed on the [deployment branch](https://github.com/coderbunker/inventory-server/tree/deployment).
3034

31-
The deployment uses pm2 as suggested in [this tutorial](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04).
32-
33-
pm2 uses [process.yml](https://github.com/coderbunker/inventory-server/blob/deployment/process.yml) configuration file.
34-
35-
The hosting itself works with an nginx service forwarding the requests to the local webapplication.
36-
37-
Once you are listed in the [project owners](https://app.codeship.com/orgs/coderbunker/teams/owners) you can:
38-
* see deployments history: [Codeship dashboard](https://app.codeship.com/projects/261737)
39-
* manage deployment scripts [Codeship administration page](https://app.codeship.com/projects/261737/deployment_branches/187689)
40-
41-
42-
## If deployment changes ?
43-
The host needs to have read access on this reposit to download the deployment branch.
44-
45-
Add the ssh keys of the new host (the content of the file: ~/.ssh/id_rsa.pub) on the "[Deploy keys section](https://github.com/coderbunker/inventory-server/settings/keys)".
46-
47-
Before the first deployment, the reposit has to be downloaded and the deployment branch must be checkout.
48-
49-
git clone [email protected]:coderbunker/inventory-server.git
50-
cd inventory-server
51-
git checkout deployment
52-
53-
If you choose to use pm2 + nginx to monitor application, they have to be installed separately (their installation is not triggered by 'npm install').
54-
55-
## Troobleshooting.
56-
If the deployment fails, check that any application on the host is running a service on port 80.
57-
It is possible that the previous time that "inventory-server" had been lauched did not termniate properly and it is still holding the port.
58-
5935

6036
# Contribution
6137

0 commit comments

Comments
 (0)