Skip to content

Commit dd080ad

Browse files
Merged from upstream; edited Dockerfile and Readme.
1 parent 8d6dd9c commit dd080ad

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

.dockerignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
node_modules
2-
npm-debug.log
2+
**/*.log
3+
build
4+
.idea

Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ WORKDIR /home/appuser/app
1111
# Bundle app
1212
COPY . /home/appuser/app
1313

14-
# Install app dependencies
15-
# Note: here NODE_ENV env must be 'development' so that dev dependencies are installed
14+
# Here NODE_ENV must be 'development' so that all dependencies are installed
1615
RUN NODE_ENV=development npm ci
1716

1817
# Bundle JS and CSS

README.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
[![DOI](https://zenodo.org/badge/104936681.svg)](https://zenodo.org/badge/latestdoi/104936681)
44

5-
65
## Required software
76

87
- [Node.js](https://nodejs.org/en/) >=10.0.0 <11.0.0
@@ -24,7 +23,7 @@
2423
For a production build:
2524
```
2625
npm run build-prod
27-
npm run start
26+
npm start
2827
```
2928
3029
## Configuration
@@ -35,7 +34,7 @@ The following environment variables can be used to configure the server (also do
3534
- `PORT`: the port on which the server runs (default 3000)
3635
- `PC_URL`: Pathway Commons homepage URL (default: 'http://www.pathwaycommons.org/'; cPath2 service should be there available at /pc2/ path)
3736
- `NCBI_API_KEY`: NCBI E-Utilities API key ([read more](https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/))
38-
- `FACTOID_URL`: the Factoid app URL (default: 'http://unstable.factoid.baderlab.org/')
37+
- `FACTOID_URL`: the Factoid app URL (default: 'https://biofactoid.org/')
3938
- `SBGN_IMG_SERVICE_BASE_URL`: URL for service that converts SBGN to an image (i.e. [Syblars](http://syblars.cs.bilkent.edu.tr/); default is `http://localhost:9090/`)
4039
- `SBGN_IMG_PATH`: cli tool `snapshot` output folder for images (default: `public/img/pathways`)
4140
@@ -50,7 +49,7 @@ The following environment variables can be used to configure the server (also do
5049
- `npm run watch` : watch mode (debug mode enabled, autorebuild, autoreload)
5150
- `npm test` : run tests
5251
- `npm run lint` : lint the project
53-
- `npm run ci` : run the tests and lint at once
52+
- `npm run ci` : run the tests and lint and build-prod at once
5453
5554
5655
## Using Docker and Dockerfile
@@ -85,11 +84,11 @@ The `scripts/cli.js` file contains app-ui command line tools:
8584
- Requires an instance of [Syblars](http://syblars.cs.bilkent.edu.tr/) accessible at a location defined by the configuration variable `SBGN_IMG_SERVICE_BASE_URL` (see `docker-compose.yml` service `syblars`)
8685
- Images will be placed in directory `SBGN_IMG_PATH` (default: `public/img/pathways`)
8786
88-
Usage: To generate a PNG of an SBGN representation for each pathway declared in the GMT file at `downloads/PathwayCommons12.All.hgnc.gmt`:
87+
Usage: To generate a PNG of an SBGN representation for each pathway declared in the GMT file at `downloads/pc-hgnc.gmt.gz`:
8988
9089
```sh
9190
$ docker-compose up -d syblars
92-
$ SERVER_FETCH_TIMEOUT="60000" node src/scripts/cli.js snapshot --file PathwayCommons12.All.hgnc.gmt
91+
$ SERVER_FETCH_TIMEOUT="60000" node src/scripts/cli.js snapshot --file pc-hgnc.gmt
9392
```
9493
NB: The default timeout of fetch is normally quite brief (5 seconds).
9594

@@ -100,7 +99,7 @@ In this way, images will be served via expressJS at `img/pathways/:id`, where `i
10099
Students who work on the repo should follow these instructions for each feature that they work on:
101100

102101
1. Initial preparation (only needed once)
103-
1. [Make a fork on Github](https://github.com/PathwayCommons/app-ui#fork-destination-box) (if you haven't already)
102+
1. [Make a fork on GitHub](https://github.com/PathwayCommons/app-ui#fork-destination-box) (if you haven't already)
104103
under your personal account
105104
1. Check out the fork repo: `git clone https://github.com/myusername/app-ui.git`
106105
1. Change the directory to the project: `cd app-ui`
@@ -116,7 +115,7 @@ Students who work on the repo should follow these instructions for each feature
116115
1. Select `Merge into Current Branch`
117116
1. Make a feature branch for the new feature or change you are working on. Make sure to give your branch a clear, meaningful name.
118117
1. Using the console: `git checkout -b name-of-feature`
119-
1. Using GitUp: Right click the `HEAD` commit (which should be the top commit of your local `development` branch),
118+
1. Using GitUp: right-click the `HEAD` commit (which should be the top commit of your local `development` branch),
120119
then select `Create Branch...`
121120
1. Make commits as you're working on your feature:
122121
1. Using the console: `git commit -am "My descriptive commit message"`

src/server/db.js

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const { DB_NAME, DB_HOST, DB_PORT, DB_CERT, DB_USER, DB_PASS } = require('../con
33
const Promise = require('bluebird');
44
let fs = require('fs');
55

6-
76
let db = {
87
connect(){
98
if( this.conn ){

src/server/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ cron.schedule(METADATA_CRON_SCHEDULE, () => {
2222
// make fetch() available as a global just like it is on the client side
2323
global.fetch = require('node-fetch');
2424

25-
// const db = require('./db'); // for now disable db
2625
const logger = require('./logger');
2726

2827
const app = express();

0 commit comments

Comments
 (0)