Renamed deployable war to ROOT in order to homogenize urls regardless… (#141)

* Renamed deployable war to ROOT in order to homogenize urls regardless of deployment method

* Made Maven quite when doing downloading dependencies
This commit is contained in:
Jens Kristian Villadsen
2020-09-21 19:19:10 +02:00
committed by GitHub
parent c42530e3f3
commit ee337296ee
4 changed files with 13 additions and 13 deletions

View File

@@ -2,12 +2,12 @@ FROM maven:3.6.3-jdk-11-slim as build-hapi
WORKDIR /tmp/hapi-fhir-jpaserver-starter WORKDIR /tmp/hapi-fhir-jpaserver-starter
COPY pom.xml . COPY pom.xml .
RUN mvn dependency:go-offline RUN mvn -ntp dependency:go-offline
COPY src/ /tmp/hapi-fhir-jpaserver-starter/src/ COPY src/ /tmp/hapi-fhir-jpaserver-starter/src/
RUN mvn clean install -DskipTests RUN mvn clean install -DskipTests
FROM tomcat:9.0.37-jdk11-openjdk-slim-buster FROM tomcat:9.0.38-jdk11-openjdk-slim-buster
RUN mkdir -p /data/hapi/lucenefiles && chmod 775 /data/hapi/lucenefiles RUN mkdir -p /data/hapi/lucenefiles && chmod 775 /data/hapi/lucenefiles
COPY --from=build-hapi /tmp/hapi-fhir-jpaserver-starter/target/*.war /usr/local/tomcat/webapps/ COPY --from=build-hapi /tmp/hapi-fhir-jpaserver-starter/target/*.war /usr/local/tomcat/webapps/

View File

@@ -135,14 +135,14 @@ Server will then be accessible at http://localhost:8080/ and eg. http://localhos
```bash ```bash
./build-docker-image.sh && docker run -p 8080:8080 -e "spring.batch.job.enabled=false" hapi-fhir/hapi-fhir-jpaserver-starter:latest ./build-docker-image.sh && docker run -p 8080:8080 -e "spring.batch.job.enabled=false" hapi-fhir/hapi-fhir-jpaserver-starter:latest
``` ```
Server will then be accessible at http://localhost:8080/hapi-fhir-jpaserver and eg. http://localhost:8080/hapi-fhir-jpaserver/fhir/metadata. Remember to adjust you overlay configuration in the application.yaml to eg. Server will then be accessible at http://localhost:8080/ and eg. http://localhost:8080/fhir/metadata. Remember to adjust you overlay configuration in the application.yaml to eg.
```yaml ```yaml
tester: tester:
- -
id: home id: home
name: Local Tester name: Local Tester
server_address: 'http://localhost:8080/hapi-fhir-jpaserver/fhir' server_address: 'http://localhost:8080/fhir'
refuse_to_fetch_third_party_urls: false refuse_to_fetch_third_party_urls: false
fhir_version: R4 fhir_version: R4
``` ```

16
pom.xml
View File

@@ -21,11 +21,11 @@
<properties> <properties>
<java.version>8</java.version> <java.version>8</java.version>
<spring.boot>2.3.3.RELEASE</spring.boot> <spring_boot_version>2.3.4.RELEASE</spring_boot_version>
</properties> </properties>
<prerequisites> <prerequisites>
<maven>3.6.0</maven> <maven>3.6.3</maven>
</prerequisites> </prerequisites>
<packaging>war</packaging> <packaging>war</packaging>
@@ -269,7 +269,7 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId> <artifactId>spring-boot-autoconfigure</artifactId>
<version>${spring.boot}</version> <version>${spring_boot_version}</version>
</dependency> </dependency>
@@ -289,7 +289,7 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<version>${spring.boot}</version> <version>${spring_boot_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
@@ -298,8 +298,8 @@
<build> <build>
<!-- Tells Maven to name the generated WAR file as hapi-fhir-jpaserver.war --> <!-- Tells Maven to name the generated WAR file as ROOT.war -->
<finalName>hapi-fhir-jpaserver</finalName> <finalName>ROOT</finalName>
<plugins> <plugins>
<plugin> <plugin>
@@ -495,7 +495,7 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
<version>2.3.3.RELEASE</version> <version>${spring_boot_version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
</profile> </profile>
@@ -508,7 +508,7 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
<version>2.3.3.RELEASE</version> <version>${spring_boot_version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>

View File

@@ -86,7 +86,7 @@ hapi:
- -
id: home id: home
name: Local Tester name: Local Tester
server_address: 'http://localhost:8080/hapi-fhir-jpaserver/fhir' server_address: 'http://localhost:8080/fhir'
refuse_to_fetch_third_party_urls: false refuse_to_fetch_third_party_urls: false
fhir_version: R4 fhir_version: R4
- -