Skip to content

Commit b7dac22

Browse files
committed
documentation on docker
1 parent f5e526f commit b7dac22

File tree

3 files changed

+95
-12
lines changed

3 files changed

+95
-12
lines changed

NOTICE.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
Copyright 2016 Mark Robinson
1+
Copyright (c) 2016 Mark Robinson
2+
Copyright (c) 2016 University of Manchester
23

3-
Licensed under the Apache License, Version 2.0 (the "License");
4-
you may not use this file except in compliance with the License.
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
56
You may obtain a copy of the License at:
67

78
http://www.apache.org/licenses/LICENSE-2.0
89

9-
Unless required by applicable law or agreed to in writing, software
10-
distributed under the License is distributed on an "AS IS" BASIS,
11-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12-
implied. See the License for the specific language governing
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13+
implied. See the License for the specific language governing
1314
permissions and limitations under the License.

README.md

Lines changed: 78 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,90 @@
1-
## About
1+
# CWL Viewer
22

3-
This is a work-in-progress [Spring Boot](http://projects.spring.io/spring-boot/) MVC application which fetches [Common Workflow Language](http://www.commonwl.org/) files from a Github repository and creates a page for it detailing the main workflow and its inputs, outputs and steps
3+
This is a work-in-progress [Spring Boot](http://projects.spring.io/spring-boot/) MVC application which fetches [Common Workflow Language](http://www.commonwl.org/) files from a Github repository and creates a page for it detailing the main workflow and its inputs, outputs and steps.
4+
5+
## License
6+
7+
Distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
8+
See the file [LICENSE.md](LICENSE.md) for details, and
9+
[NOTICE.md](NOTICE.md) for required attribution notices.
10+
11+
## Contribute
12+
13+
Feel free to contribute! You may [raise an issue](https://github.com/common-workflow-language/cwlviewer/issues),
14+
provide a [pull request](https://github.com/common-workflow-language/cwlviewer/pulls)
15+
or join the [gitter chat for common-workflow-language](https://gitter.im/common-workflow-language/common-workflow-language)!
16+
17+
18+
## Running with Docker
19+
20+
This application can be started with [Docker](https://www.docker.com/).
21+
22+
If you have [Docker Compose](https://docs.docker.com/compose/install/), then to start
23+
MongoDB and CWLViewer exposed on port `8080`, run:
24+
25+
docker-compose up
26+
27+
To stop and remove:
28+
29+
docker-compose down
30+
31+
If you change the source code, re-build with `docker-compose build`.
32+
33+
See the [docker-compose.yml](docker-compose.yml) file for details.
34+
35+
If you don't want to use Docker Compose, you can do the equivalent manually with `docker`:
36+
37+
docker build -t cwlviewer .
38+
docker run --name cwlviewer-mongo -p 27017:27017 -d mongo
39+
docker run --name cwlviewer -p 8080:8080 --link cwlviewer-mongo:mongo -d cwlviewer
40+
docker logs -f cwlviewer
41+
42+
## Requirement: MongoDB
43+
44+
You will need to have [MongoDB](https://www.mongodb.com/) running,
45+
by default on `localhost:27017`.
46+
47+
(You can override this by supplying system properties like
48+
`-Dspring.data.mongodb.host=mongo` or `-Dspring.data.mongodb.port=1337`)
49+
50+
If you have Docker, but are not using the Docker Compose method above,
51+
you may start MongoDB with [Docker](https://www.docker.com/) using:
52+
53+
docker run --name cwlviewer-mongo -p 27017:27017 -d mongo
54+
55+
Note that this exposes mongodb to the world on port `27017`.
456

557

658
## Building and Running
759

60+
To compile you will need [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or OpenJDK 8 (`apt install openjdk-8-jdk`),
61+
as well as [Apache Maven 3](https://maven.apache.org/download.cgi) (`apt install maven`).
62+
863
Spring Boot uses an embedded HTTP server. The Spring Boot Maven plugin includes a run goal which can be used to quickly compile and run it:
964

1065
```
1166
$ mvn spring-boot:run
1267
```
1368

14-
Alternatively, you can run the application from your IDE as a simple Java application by importing the Maven project
1569

16-
It is also possible to build a war file which is executable and deployable into an external container by [following the instructions here](that is both executable and deployable into an external container)
70+
Alternatively, you can run the application from your IDE as a simple Java application by importing the Maven project.
71+
72+
You can create an executable JAR file by using:
73+
74+
mvn clean install
75+
76+
Afterwards, run:
77+
78+
java -jar target/cwlvisualizer*.jar
79+
80+
(The exact filename will vary per version)
81+
82+
Once CWL Visualizer is running, you should see log output somewhat like:
83+
84+
```
85+
()..)
86+
s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
87+
org.researchobject.CwlViewerApplication : Started CwlViewerApplication in 28.604 seconds
88+
```
89+
90+
Now check out http://localhost:8080/ to access CWL Viewer.

src/main/resources/application.properties

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,12 @@ totalFileSizeLimit = 10000000
1919
# Authentication increases rate limit from 50 requests/hr to 5000 requests/hr
2020
githubAPI.authentication = false
2121
githubAPI.username = username
22-
githubAPI.password = password
22+
githubAPI.password = password
23+
24+
#=======================
25+
# MongoDB settings
26+
#=======================
27+
spring.data.mongodb.host = localhost
28+
spring.data.mongodb.port = 27017
29+
# For complete list of MongoDB properties, see
30+
# https://github.com/spring-projects/spring-boot/blob/v1.4.2.RELEASE/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java

0 commit comments

Comments
 (0)