Skip to content

Commit d06c19b

Browse files
committed
adding docker
1 parent 8b7c251 commit d06c19b

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

dockerfiles/ohsome-api.dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM amazoncorretto:17-alpine-jdk
2+
3+
COPY ./dist/ohsome-api-sut.jar .
4+
COPY ./dist/jacocoagent.jar .
5+
6+
7+
8+
9+
COPY ./scripts/dockerize/data/additional_files/ohsome-api/heidelberg.mv.db .
10+
11+
12+
13+
#ENV TOOL="undefined"
14+
#ENV RUN="0"
15+
16+
ENTRYPOINT \
17+
java \
18+
# unfortunately dumponexit is completely unreliable in Docker :(
19+
# -javaagent:jacocoagent.jar=destfile=./jacoco/ohsome-api__${TOOL}__${RUN}__jacoco.exec,append=false,dumponexit=true \
20+
-javaagent:jacocoagent.jar=output=tcpserver,address=*,port=6300,append=false,dumponexit=false \
21+
-jar ohsome-api-sut.jar \
22+
--server.port=8080 --database.db=heidelberg

dockerfiles/ohsome-api.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
services:
2+
sut-ohsome-api:
3+
build:
4+
dockerfile: ./dockerfiles/ohsome-api.dockerfile
5+
context: ..
6+
# environment:
7+
# TOOL: ${TOOL:-undefined}
8+
# RUN: ${RUN:-0}
9+
ports:
10+
- "${HOST_PORT:-8080}:8080"
11+
- "${JACOCO_PORT:-6300}:6300"
12+
# volumes:
13+
# default env does not work on volumes
14+
# - ${JACOCODIR}:/jacoco
15+
Binary file not shown.

scripts/dockerize/data/sut.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ youtube-mock,TRUE,"",--server.port=8080,http://localhost:8080/swagger.yaml,http:
2424
person-controller,TRUE,"",--server.port=8080 --spring.data.mongodb.uri=mongodb://db:27017 --spring.cache.type=None,http://localhost:8080/v3/api-docs,http://localhost:8080,FALSE,mongo:7.0,27017,/data/db,,,FALSE,FALSE,
2525
tracking-system,TRUE,"","--server.port=8080 --spring.profiles.active=dev --spring.datasource.url=""jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1"" --spring.datasource.username=sa --spring.datasource.password",http://localhost:8080/app/v2/api-docs,http://localhost:8080,FALSE,,,,,,FALSE,FALSE,
2626
tiltaksgjennomforing-api,TRUE,"",--server.port=8080 --spring.profiles.active=dev-gcp-labs --spring.datasource.driverClassName=org.postgresql.Driver --spring.sql.init.platform=postgres --no.nav.security.jwt.issuer.aad.discoveryurl=http://mock-oauth2-server:8083/aad/.well-known/openid-configuration --no.nav.security.jwt.issuer.aad.accepted_audience=aad --no.nav.security.jwt.issuer.system.discoveryurl=http://mock-oauth2-server:8083/system/.well-known/openid-configuration --no.nav.security.jwt.issuer.system.accepted_audience=system --no.nav.security.jwt.issuer.tokenx.discoveryurl=http://mock-oauth2-server:8083/tokenx/.well-known/openid-configuration --no.nav.security.jwt.issuer.tokenx.accepted_audience=tokenx --management.server.port=-1 --server.ssl.enabled=false --spring.datasource.url=jdbc:postgresql://db:5432/tiltaksgjennomforing --spring.datasource.username=postgres --spring.datasource.password=password --sentry.logging.enabled=false --sentry.environment=local --logging.level.root=OFF --logging.config=classpath:logback-spring.xml --logging.level.org.springframework=INFO,http://localhost:8080/tiltaksgjennomforing-api/v3/api-docs,http://localhost:8080,FALSE,postgres:13.13,5432,/var/lib/postgresql/data,POSTGRES_PASSWORD: password;POSTGRES_HOST_AUTH_METHOD: trust;POSTGRES_DB: tiltaksgjennomforing,,TRUE,FALSE,
27+
ohsome-api,TRUE,,--server.port=8080 --database.db=heidelberg,http:///localhost:8080/docs?group=Data%20Aggregation,http://localhost:8080,TRUE,,,,,,FALSE,FALSE,

0 commit comments

Comments
 (0)