|
1 |
| -## About |
| 1 | +# CWL Viewer |
2 | 2 |
|
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`. |
4 | 56 |
|
5 | 57 |
|
6 | 58 | ## Building and Running
|
7 | 59 |
|
| 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 | + |
8 | 63 | 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:
|
9 | 64 |
|
10 | 65 | ```
|
11 | 66 | $ mvn spring-boot:run
|
12 | 67 | ```
|
13 | 68 |
|
14 |
| -Alternatively, you can run the application from your IDE as a simple Java application by importing the Maven project |
15 | 69 |
|
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. |
0 commit comments