Skip to content

Commit cf76af4

Browse files
author
Mark Robinson
committed
Merge branch 'master' into highlighting
# Conflicts: # src/main/resources/static/js/workflow.js
2 parents a763695 + 659ac87 commit cf76af4

28 files changed

+983
-211
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ nbproject/private/
1919
build/
2020
nbbuild/
2121
nbdist/
22-
.nb-gradle/
22+
.nb-gradle/docker-compose.override.yml

Dockerfile

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
FROM maven:3.3-jdk-8-alpine
22
MAINTAINER Stian Soiland-Reyes <[email protected]>
33

4-
RUN apk add --update graphviz && rm -rf /var/cache/apk/*
4+
# Build-time metadata as defined at http://label-schema.org
5+
ARG BUILD_DATE
6+
ARG VCS_REF
7+
ARG VERSION
8+
LABEL org.label-schema.build-date=$BUILD_DATE \
9+
org.label-schema.name="CWL Viewer" \
10+
org.label-schema.description="Viewer of Common Workflow Language" \
11+
org.label-schema.url="https://view.commonwl.org/" \
12+
org.label-schema.vcs-ref=$VCS_REF \
13+
org.label-schema.vcs-url="https://github.com/common-workflow-language/cwlviewer" \
14+
org.label-schema.vendor="Common Workflow Language project" \
15+
org.label-schema.version=$VERSION \
16+
org.label-schema.schema-version="1.0"
17+
18+
19+
RUN apk add --update graphviz ttf-freefont && rm -rf /var/cache/apk/*
520

621
RUN mkdir /usr/share/maven/ref/repository
722

@@ -24,4 +39,6 @@ WORKDIR /tmp
2439
EXPOSE 8080
2540

2641
# Expects mongodb on port 27017
27-
CMD ["/usr/bin/java", "-Dspring.data.mongodb.host=mongo", "-jar", "/usr/lib/cwlvisualizer.jar"]
42+
ENV SPRING_DATA_MONGODB_HOST=mongo
43+
ENV SPRING_DATA_MONGODB_PORT=27017
44+
CMD ["/usr/bin/java", "-jar", "/usr/lib/cwlvisualizer.jar"]

LICENSE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,11 @@ been federally registered with the United States Copyright Office.
212212
All rights reserved.
213213

214214
Use rules apply: https://github.com/logos
215+
216+
---------------------------------------------------------
217+
218+
./src/main/resources/static/img/Docker-logo.png
219+
220+
Copyright 2013-2015 Docker, Inc. All rights reserved.
221+
222+
Use rules apply: https://www.docker.com/brand-guidelines

README.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
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.
44

5-
[![Build Status](https://travis-ci.org/common-workflow-language/cwlviewer.svg?branch=master)](https://travis-ci.org/common-workflow-language/cwlviewer) [![Gitter](https://img.shields.io/gitter/room/gitterHQ/gitter.svg)](https://gitter.im/common-workflow-language/common-workflow-language?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![](https://images.microbadger.com/badges/image/commonworkflowlanguage/cwlviewer.svg)](https://microbadger.com/images/commonworkflowlanguage/cwlviewer "Get your own image badge on microbadger.com") [![Docker image commonworkflowlanguage/cwlviewer](https://images.microbadger.com/badges/version/commonworkflowlanguage/cwlviewer.svg)](https://hub.docker.com/r/commonworkflowlanguage/cwlviewer/ "Get your own version badge on microbadger.com")
5+
[![Build Status](https://travis-ci.org/common-workflow-language/cwlviewer.svg?branch=master)](https://travis-ci.org/common-workflow-language/cwlviewer) [![Gitter](https://img.shields.io/gitter/room/gitterHQ/gitter.svg)](https://gitter.im/common-workflow-language/common-workflow-language?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![](https://images.microbadger.com/badges/image/commonworkflowlanguage/cwlviewer.svg)](https://microbadger.com/images/commonworkflowlanguage/cwlviewer "MicroBadger commonworkflowlanguage/cwlviewer") [![Docker image commonworkflowlanguage/cwlviewer](https://images.microbadger.com/badges/version/commonworkflowlanguage/cwlviewer.svg)](https://hub.docker.com/r/commonworkflowlanguage/cwlviewer/ "Docker Hub commonworkflowlanguage/cwlviewer")
66

77

88

@@ -32,7 +32,16 @@ To stop and remove:
3232

3333
docker-compose down
3434

35-
If you change the source code, re-build with `docker-compose build`.
35+
If you change the source code, then use this `docker-compose.override.yml` and
36+
re-build with `docker-compose build`:
37+
38+
```yaml
39+
version: '2'
40+
services:
41+
spring:
42+
build: .
43+
```
44+
3645
3746
See the [docker-compose.yml](docker-compose.yml) file for details.
3847
@@ -53,16 +62,41 @@ If you have modified the source code, then you may want to build the docker imag
5362
You will need to have [MongoDB](https://www.mongodb.com/) running,
5463
by default on `localhost:27017`.
5564

56-
(You can override this by supplying system properties like
57-
`-Dspring.data.mongodb.host=mongo` or `-Dspring.data.mongodb.port=1337`)
65+
If you are running from the command line, you can override this by supplying
66+
system properties like `-Dspring.data.mongodb.host=mongo.example.org` and
67+
`-Dspring.data.mongodb.port=1337`
5868

5969
If you have Docker, but are not using the Docker Compose method above,
6070
you may start MongoDB with [Docker](https://www.docker.com/) using:
6171

6272
docker run --name cwlviewer-mongo -p 27017:27017 -d mongo
6373

64-
Note that this exposes mongodb to the world on port `27017`.
74+
**WARNING**: The above expose mongodb to the world on port `27017`.
75+
76+
## Configuration
77+
78+
There are a variety of configuration options detailed in the [application configuration file](https://github.com/common-workflow-language/cwlviewer/blob/master/src/main/resources/application.properties) which can be adjusted.
79+
80+
When deploying with docker, these can be overriden externally by creating/modifying `docker-compose.override.yml` as follows:
81+
82+
```yaml
83+
version: '2'
84+
services:
85+
spring:
86+
environment:
87+
githubAPI.authentication: oauth
88+
githubAPI.oauthToken: abcdefghhijklmnopqrstuvwxyz
89+
```
90+
91+
The properties can alternatively be provided as system properties on the
92+
command line, e.g. `-DgithubAPI.authentication=oauth`
93+
`-DgithubAPI.oauthToken=abcdefghhijklmnopqrstuvwxyz` or via a [variety of other methods supported by Spring Boot](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html)
94+
95+
### Github API
96+
97+
If you run cwlviewer in production, you are likely to hit the GitHub API's rate limit of 60 requests/hr. This can be increased to 5000 requests/hr by using authentication (either basic or OAuth) by setting the `githubAPI.authentication` and either `githubAPI.oauthToken` or both `githubAPI.username` and `githubAPI.password` in the [application configuration file](https://github.com/common-workflow-language/cwlviewer/blob/master/src/main/resources/application.properties) depending on the method.
6598

99+
OAuth tokens can be obtained using the [Github authorizations API](https://developer.github.com/v3/oauth_authorizations/).
66100

67101
## Building and Running
68102

pom.xml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
<id>jitpack.io</id>
3030
<url>https://jitpack.io</url>
3131
</repository>
32+
<repository>
33+
<id>apache.snapshots</id>
34+
<name>Apache Snapshot Repository</name>
35+
<url>http://repository.apache.org/snapshots</url>
36+
<releases>
37+
<enabled>false</enabled>
38+
</releases>
39+
</repository>
3240
</repositories>
3341

3442
<dependencies>
@@ -72,7 +80,7 @@
7280
<dependency>
7381
<groupId>org.apache.taverna.language</groupId>
7482
<artifactId>taverna-robundle</artifactId>
75-
<version>0.15.1-incubating</version>
83+
<version>0.16.0-incubating-SNAPSHOT</version>
7684
<exclusions>
7785
<exclusion>
7886
<groupId>org.slf4j</groupId>
@@ -90,6 +98,5 @@
9098
</plugin>
9199
</plugins>
92100
</build>
93-
94-
101+
95102
</project>

0 commit comments

Comments
 (0)