README.md 1.06 KB
Newer Older
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
1
## System requirements
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
2

Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
3
- [Nodejs](https://nodejs.org/en/)
4
- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
5

Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
6
## Start web portal application
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
7

Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
8
9
1. In the root folder run
  ```
10
  npm install
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
11
12
  ```
2. After installing all the dependencies, you should be able to run the project
13
14
15
  ```
  npm start
  ```
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
16

Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
17
## Test docker image locally
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
18

19
We can build the docker image to test the production build of the system:
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
20
```
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
21
docker build . -t web-portal
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
22
```
23
Once it is built, we can run the container with the app listening on `http://localhost:3000`:
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
24
```
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
25
docker run -p 3000:3000 web-portal
Pablo Roncero Fernandez's avatar
Pablo Roncero Fernandez committed
26
```
27
28
29

## Testing locally push registration
Push registration requires SSL and a valid cert, even on localhost.
Carina Antunes's avatar
Carina Antunes committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

## Troubleshooting

### sass build error on master
```
/usr/src/app/node_modules/node-sass/lib/binding.js:13
      throw new Error(errors.unsupportedEnvironment());
      ^
Error: Node Sass does not yet support your current environment: Linux/musl 64-bit with Unsupported runtime (88)
```

Solution:
```
npm uninstall node-sass-chokidar && npm install node-sass-chokidar
```