Skip to content

Commit 64e0000

Browse files
author
Paul Philion
committed
more docs
1 parent 23cfa2e commit 64e0000

File tree

2 files changed

+38
-14
lines changed

2 files changed

+38
-14
lines changed

README.md

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,20 @@ Now hosted on https://coverage.seattlecommunitynetwork.org/
99
To install this service, the fist time, you will need to:
1010

1111
1. Required tools and versions:
12-
1. node
13-
2. npm
12+
1. Install `node` and `npm` according to the directions at https://nodejs.org/en/download/package-manager
13+
2. Install `pm2` using: `npm install pm2 -g` (as per https://www.npmjs.com/package/pm2#installing-pm2)
1414
2. Configure:
15-
1. x
16-
2. y
17-
3. z
15+
1. Edit `src/utils/config.ts` and set the correct URL for your API host (if you're testing or you're deploying to a new URL).
1816
3. Deploy as below.
1917

20-
* What tools are needed and how are they installed?
21-
* What configuration is needed?
22-
* How is configuration set?
23-
2418

2519
## Deploying
2620
Once the service has been setup (as above), it can be deployed using the following process:
2721
1. Login to the <coverage-host>
2822
2. Pull the lastest version from github
2923
3. Restart the server
3024

25+
The shell commands are:
3126
```
3227
ssh <coverage-host>
3328
cd ccn-coverage-vis
@@ -43,28 +38,57 @@ When a problem occurs, there are several checks to determine where the failure i
4338
3. Confirm nginx is operating as expected
4439

4540
### Checking HTTP errors in the browser
41+
First, open your browser and go to: https://coverage.seattlecommunitynetwork.org/
42+
43+
Is it working?
44+
45+
If not, open up the browser **Web Developer Tools**, usually under the menu Tools > Developer Tools > Web Developer Tools.
46+
47+
With this panel open at the bottom of the screen select the **Network** tab and refresh the browser page.
4648

49+
Look in the first column, Status:
50+
* 200: Ok
51+
* 502: Error with the backend services (behind nginx)
52+
* 500 errors: problem with nxginx. Look in `/var/log/nginx/error.log` for details.
53+
* 400 errors: problem with the service. Check the service logs and nginx logs.
54+
* Timeout or unreachable error: Something is broken in the network between your web browser and the coverage-vis host.
4755

4856

4957
### Checking ccn-coverage-vis with pm2
58+
Next, confirm ccn-coverage-vis is operating as expected. To do this, you will need to be able to log into the server hosting the coverage service.
5059

60+
Use `pm2 list` to confirm the "Vis Server" is **online**
5161
```
5262
ssh <coverage-host>
5363
pm2 list
54-
# expect "API" in the list, expect running, screenshot
5564
```
65+
![Online services under PM2](pm2-running-services.png "Online services under PM2")
5666

57-
58-
Running? check pm2
67+
If the "Vis Server" is not online as expected, restart it with:
68+
```
69+
pm2 restart Vis Server
70+
```
5971

6072

6173
### Checking nginx
74+
If there appear problems with nginx, then check that the
6275

63-
Check service operation
76+
Check service operation:
77+
```
78+
systemctl status nginx
79+
```
6480

65-
Check nginx logs
81+
Check nginx logs:
82+
```
83+
sudo tail /var/log/nginx/error.log
84+
```
6685

86+
Sources of errors might include nginx configuration in `/etc/nginx/conf.d/01-ccn-coverage.conf`
6787

88+
If you need to restart nginx, use:
89+
```
90+
sudo systemctl restart nginx
91+
```
6892

6993
## Testing
7094

pm2-running-services.png

17.5 KB
Loading

0 commit comments

Comments
 (0)