I was responsible for developing this project for a client called INPE (Brazilian equivalent to NASA.)
This project is a fork of the original Open-Source repository (in which is registered under the MIT License).
You should user Node version >= 12
$ yarn install
then start the server
$ yarn start
$ yarn test
Getting the coverage report:
$ yarn coverage
Gets the file based on the Json Web Token that are sent in the requisition.
URL : /download/:projectId/:frequency
Path Params :
projectId: `['deter-cerrado', 'deter-amz']`
frequency: `['monthly', 'daily']`
Method : GET
Auth required : NO
Permissions required : None
Condition : User gets the public file.
Code : 200 OK
Content : {type: public}
{
"type": "public"
}
Condition : User gets the admin file.
Code : 200 OK
Content : {type: admin}
{
"type": "admin"
}
From your Node.js app project folder launch those commands:
$ docker build -t file-delivery .
$ docker run -p 9000:9000 file-delivery
$ docker build -t file-delivery .
$ docker images # look and find the hash you want
$ docker tag local-image:tagname reponame:tagname
$ docker push reponame:tagname
# EXAMPLE:
$ docker tag bfe06c2b5dea terrabrasilis/file-delivery:v1.0.0
$ docker push terrabrasilis/file-delivery
Command | Description |
---|---|
$ docker exec -it <container-id> pm2 monit |
Monitoring CPU/Usage of each process |
$ docker exec -it <container-id> pm2 list |
Listing managed processes |
$ docker exec -it <container-id> pm2 show |
Get more information about a process |
$ docker exec -it <container-id> pm2 reload all |
0sec downtime reload all applications |
$ docker exec -it <container-id> pm2 logs --format |
see all applications logs |
$ docker exec -it <container-id> pm2 flush |
flush applications logs |
MIT © Paulo Luan