Skip to content

Commit

Permalink
Add quarkus-based docker images (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
acoburn authored May 23, 2020
1 parent 3f3387a commit d59ef82
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 10 deletions.
24 changes: 19 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,38 @@ branches:

jobs:
include:
- name: "Trellis - Triplestore"
- name: "Trellis - Triplestore (quarkus)"
before_install: docker-compose -f trellis-quarkus-triplestore-compose.yml up -d
script:
- python verify_running.py --baseurl http://localhost/
- python setup.py test -a "--baseurl=http://localhost/"
- sh run_ldp_testsuite.sh

- name: "Trellis - PostgreSQL (quarkus)"
before_install: docker-compose -f trellis-quarkus-postgresql-compose.yml up -d
script:
- python verify_running.py --baseurl http://localhost/
- python setup.py test -a "--baseurl=http://localhost/"
- sh run_ldp_testsuite.sh

- name: "Trellis - Triplestore (dropwizard)"
before_install: docker-compose -f trellis-compose.yml up -d
script:
- python verify_running.py --baseurl http://localhost/
- python setup.py test -a "--baseurl=http://localhost/"
- sh run_ldp_testsuite.sh

- name: "Trellis - H2"
- name: "Trellis - H2 (dropwizard)"
before_install: docker-compose -f trellis-h2-compose.yml up -d
script:
- python verify_running.py --baseurl http://localhost/
- python setup.py test -a "--baseurl=http://localhost/"

- name: "Trellis - PostgreSQL"
before_install: docker-compose -f trellis-postgres-compose.yml up -d
- name: "Trellis - PostgreSQL (dropwizard)"
before_install: docker-compose -f trellis-postgresql-compose.yml up -d
script:
- python verify_running.py --baseurl http://localhost/
- python setup.py test -a "--baseurl=http://localhost/"
- docker ps -a
- sh run_ldp_testsuite.sh
- aws s3 cp --recursive --exclude "*" --include "*.html" --include "*.ttl" ./report s3://$AWS_BUCKET/ldp/report
- aws s3 cp --recursive --content-type "application/ld+json" --exclude "*" --include "*.jsonld" ./report s3://$AWS_BUCKET/ldp/report
Expand Down
4 changes: 2 additions & 2 deletions tests/test_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def test_get_container(baseurl):
r = requests.get(baseurl)

assert 200 == r.status_code
assert "text/turtle" == r.headers['content-type']
assert "text/turtle" in r.headers['content-type']
links = parse_header_links(r.headers['link'])
types = [l['url'] for l in links if (l['rel'] == 'type')]
assert "http://www.w3.org/ns/ldp#BasicContainer" in types
Expand All @@ -29,7 +29,7 @@ def test_post_binary(baseurl):

r = requests.get(location)
assert 200 == r.status_code
assert "text/plain" == r.headers['content-type']
assert "text/plain" in r.headers['content-type']
assert data == r.text

r = requests.get(baseurl, headers={"accept":"application/ld+json"})
Expand Down
2 changes: 1 addition & 1 deletion trellis-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
image: trellisldp/trellis:develop
environment:
TRELLIS_RDF: /opt/trellis/data/rdf
JAVA_OPTS: "-Dtrellis.http.weak-etag=false -Dtrellis.http.memento-header-dates=false -Dtrellis.http.precondition-required=true -Dtrellis.db.ldp-type=true"
JAVA_OPTS: "-Dtrellis.http.weak-etag=false -Dtrellis.http.memento-header-dates=false -Dtrellis.http.precondition-required=true -Dtrellis.triplestore.ldp-type=true"
ports:
- 80:8080

2 changes: 1 addition & 1 deletion trellis-h2-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ services:
TRELLIS_DB_USERNAME: trellis
TRELLIS_DB_PASSWORD: trellis
TRELLIS_DB_URL: jdbc:h2:/opt/trellis/database
JAVA_OPTS: "-Dtrellis.http.weak-etag=false -Dtrellis.http.memento-header-dates=false -Dtrellis.http.precondition-required=true -Dtrellis.db.ldp-type=true"
JAVA_OPTS: "-Dtrellis.http.weak-etag=false -Dtrellis.http.memento-header-dates=false -Dtrellis.http.precondition-required=true -Dtrellis.jdbc.ldp-type=true"
ports:
- 80:8080
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
TRELLIS_DB_USERNAME: trellis
TRELLIS_DB_PASSWORD: trellis
TRELLIS_DB_URL: jdbc:postgresql://db/trellis
JAVA_OPTS: "-Dtrellis.http.weak-etag=false -Dtrellis.http.memento-header-dates=false -Dtrellis.http.precondition-required=true -Dtrellis.db.ldp-type=true"
JAVA_OPTS: "-Dtrellis.http.weak-etag=false -Dtrellis.http.memento-header-dates=false -Dtrellis.http.precondition-required=true -Dtrellis.jdbc.ldp-type=true"
ports:
- 80:8080
depends_on:
Expand Down
23 changes: 23 additions & 0 deletions trellis-quarkus-postgresql-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: "3"
services:
trellis-db:
image: trellisldp/trellis-postgresql:develop
environment:
QUARKUS_DATASOURCE_USERNAME: trellis
QUARKUS_DATASOURCE_PASSWORD: trellis
QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://db/trellis
TRELLIS_HTTP_WEAK_ETAG: "false"
TRELLIS_HTTP_MEMENTO_HEADER_DATES: "false"
TRELLIS_HTTP_PRECONDITION_REQUIRED: "true"
TRELLIS_JDBC_LDP_TYPE: "true"
ports:
- 80:8080
depends_on:
- db
db:
image: postgres
environment:
POSTGRES_DB: trellis
POSTGRES_PASSWORD: trellis
POSTGRES_USER: trellis

13 changes: 13 additions & 0 deletions trellis-quarkus-triplestore-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "3"
services:
trellis:
image: trellisldp/trellis-triplestore:develop
environment:
TRELLIS_HTTP_WEAK_ETAG: "false"
TRELLIS_HTTP_MEMENTO_HEADER_DATES: "false"
TRELLIS_HTTP_PRECONDITION_REQUIRED: "true"
TRELLIS_TRIPLESTORE_LDP_TYPE: "true"
TRELLIS_TRIPLESTORE_RDF_LOCATION: /opt/trellis/data/rdf
ports:
- 80:8080

0 comments on commit d59ef82

Please sign in to comment.