@@ -10,7 +10,12 @@ on the Pathway Commons' [Extended SIF](http://www.pathwaycommons.org/pc2/formats
1010Clone the repository.
1111
1212See ` src/main/resources/config/application.properties ` comments;
13- download the extended SIF data file and update the properties accordingly
13+ download a Pathway Commons Extended SIF data archive and save it as data.txt.gz in this project directory, e.g.:
14+
15+ ``` commandline
16+ wget -O data.txt.gz "https://www.pathwaycommons.org/archives/PC2/v12/PathwayComons12.All.hgnc.txt.gz"
17+ ```
18+
1419(alternatively, set ` --sifgraph.data=... ` , etc., options at
1520the end of the ` java -jar ` command (see below), or set ` SIFGRAPH_DATA ` system variable.)
1621
@@ -23,22 +28,55 @@ Build:
2328Run:
2429
2530``` commandline
26- java -jar build/libs/sifgraph-server-0.3.0. jar -Xmx4g --sifgraph.data="file:/path/to/graph.txt.gz" --server.port=8080
31+ java -Xmx8g - jar build/libs/sifgraph-server*. jar
2732```
2833
2934Note: override the default list of SIF patterns using ` --sifgraph.relationships=... ` if needed (depends on the data).
3035
31- If you want to run __ different instances__ of the graph server, e.g., for different species, then simply
32- copy src/main/resources/config/application.properties to the work/current directory,
36+ If you want to run __ different instances__ of the graph server, e.g., for different species, then
37+ copy src/main/resources/config/application.properties to the work directory,
3338rename (e.g., my.properties), modify (e.g., set another ` server.port ` , ` sifgraph.relationships `
3439and ` sifgraph.data ` file), and run as:
3540
3641``` commandline
37- java -jar build/libs/sifgraph-server.jar --spring.config.name=my
42+ java -Xmx8g - jar build/libs/sifgraph-server* .jar --spring.config.name=my
3843```
3944
45+ or
46+
47+ ``` commandline
48+ java -Xmx8g -jar build/libs/sifgraph-server*.jar --sifgraph.data="file:<other.file>" --server.port=<otherPort>
49+ ```
50+
51+
4052RESTful API (Swagger docs):
4153
4254Once the app is built and running,
4355the auto-generated documentation is available at
4456` http://localhost:8080/sifgraph/ `
57+
58+
59+ ## Docker
60+ You can also build and run the docker image as follows
61+ (` <PORT> ` - actual port number where the server will run; data file download step above is also required).
62+
63+ ``` commandline
64+ ./gradlew build
65+ docker build . -t pathwaycommons/sifgraph-server
66+ docker run -it --rm --name sifgraph-server -p <PORT>:8080 pathwaycommons/sifgraph-server
67+ ```
68+
69+ Optionally, (a member of 'pathwaycommons' group) can now push the latest Docker image there:
70+
71+ ``` commandline
72+ docker login
73+ docker push pathwaycommons/sifgraph-server
74+ ```
75+
76+ So, other users could skip building from sources and simply run the app:
77+ ``` commandline
78+ docker pull
79+ docker run -p <PORT>:8080 -t pathwaycommons/sifgraph-server
80+ ```
81+
82+ (you can ` Ctrl-c ` and quit the console; the container is still there running; check with ` docker ps ` )
0 commit comments