Merge pull request #672 from hapifhir/671-update-run-instructions
671 - Updated the run instructions.
This commit is contained in:
31
README.md
31
README.md
@@ -189,21 +189,32 @@ public class YourInterceptor
|
|||||||
|
|
||||||
## Running locally
|
## Running locally
|
||||||
|
|
||||||
The easiest way to run this server entirely depends on your environment requirements. At least, the following 4 ways are supported:
|
The easiest way to run this server entirely depends on your environment requirements. The following ways are supported:
|
||||||
|
|
||||||
### Using jetty
|
### Using jetty
|
||||||
```bash
|
```bash
|
||||||
mvn -Pjetty jetty:run
|
mvn -Pjetty spring-boot:run
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The Server will then be accessible at http://localhost:8080/fhir and the CapabilityStatement will be found at http://localhost:8080/fhir/metadata.
|
||||||
|
|
||||||
If you need to run this server on a different port (using Maven), you can change the port in the run command as follows:
|
### Using Spring Boot
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mvn -Pjetty -Djetty.port=8888 jetty:run
|
mvn spring-boot:run
|
||||||
```
|
```
|
||||||
|
|
||||||
Server will then be accessible at http://localhost:8888/ and eg. http://localhost:8888/fhir/metadata. Remember to adjust you overlay configuration in the application.yaml to eg.
|
The Server will then be accessible at http://localhost:8080/fhir and the CapabilityStatement will be found at http://localhost:8080/fhir/metadata.
|
||||||
|
|
||||||
|
If you want to run this server on a different port, you can change the port in the `src/main/resources/application.yaml` file as follows:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
server:
|
||||||
|
# servlet:
|
||||||
|
# context-path: /example/path
|
||||||
|
port: 8888
|
||||||
|
```
|
||||||
|
|
||||||
|
The Server will then be accessible at http://localhost:8888/fhir and the CapabilityStatement will be found at http://localhost:8888/fhir/metadata. Remember to adjust your overlay configuration in the `application.yaml` file to the following:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
tester:
|
tester:
|
||||||
@@ -219,7 +230,7 @@ Server will then be accessible at http://localhost:8888/ and eg. http://localhos
|
|||||||
```bash
|
```bash
|
||||||
mvn clean spring-boot:run -Pboot
|
mvn clean spring-boot:run -Pboot
|
||||||
```
|
```
|
||||||
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.
|
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 the following:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
tester:
|
tester:
|
||||||
@@ -235,7 +246,7 @@ Server will then be accessible at http://localhost:8080/ and eg. http://localhos
|
|||||||
```bash
|
```bash
|
||||||
mvn clean package spring-boot:repackage -Pboot && java -jar target/ROOT.war
|
mvn clean package spring-boot:repackage -Pboot && java -jar target/ROOT.war
|
||||||
```
|
```
|
||||||
Server will then be accessible at http://localhost:8080/ and eg. http://localhost:8080/fhir/metadata. Remember to adjust your 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 your overlay configuration in the application.yaml to the following:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
tester:
|
tester:
|
||||||
@@ -250,7 +261,7 @@ Server will then be accessible at http://localhost:8080/ and eg. http://localhos
|
|||||||
```bash
|
```bash
|
||||||
mvn clean package com.google.cloud.tools:jib-maven-plugin:dockerBuild -Dimage=distroless-hapi && docker run -p 8080:8080 distroless-hapi
|
mvn clean package com.google.cloud.tools:jib-maven-plugin:dockerBuild -Dimage=distroless-hapi && docker run -p 8080:8080 distroless-hapi
|
||||||
```
|
```
|
||||||
Server will then be accessible at http://localhost:8080/ and eg. http://localhost:8080/fhir/metadata. Remember to adjust your 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 your overlay configuration in the application.yaml to the following:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
tester:
|
tester:
|
||||||
@@ -266,7 +277,7 @@ Server will then be accessible at http://localhost:8080/ and eg. http://localhos
|
|||||||
```bash
|
```bash
|
||||||
./build-docker-image.sh && docker run -p 8080:8080 hapi-fhir/hapi-fhir-jpaserver-starter:latest
|
./build-docker-image.sh && docker run -p 8080:8080 hapi-fhir/hapi-fhir-jpaserver-starter:latest
|
||||||
```
|
```
|
||||||
Server will then be accessible at http://localhost:8080/ and eg. http://localhost:8080/fhir/metadata. Remember to adjust your 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 your overlay configuration in the application.yaml to the following:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
tester:
|
tester:
|
||||||
|
|||||||
17
pom.xml
17
pom.xml
@@ -596,9 +596,20 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
<!-- examples of how to start the server using the default profile-->
|
<!-- -->
|
||||||
<!-- mvn clean package jetty:run -->
|
<!-- Examples of how to run the server: -->
|
||||||
<!-- java -jar jetty-runner.jar target/hapi-fhir-jpaserver.war -->
|
<!-- -->
|
||||||
|
<!-- For Spring Boot use: -->
|
||||||
|
<!-- mvn spring-boot:run -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- For JETTY use: -->
|
||||||
|
<!-- mvn -Pjetty spring-boot:run -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- For the Tomcat WAR approach use: -->
|
||||||
|
<!-- mvn clean package -DskipTests && java -jar ./target/ROOT.war -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- NEXT: Browse to http://localhost:8080/fhir -->
|
||||||
|
<!-- -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>jetty</id>
|
<id>jetty</id>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#Uncomment the following lines to enable the fhir endpoint to be available at /example/path/fhir instead of /fhir
|
#Uncomment the "servlet" and "context-path" lines below to make the fhir endpoint available at /example/path/fhir instead of the default value of /fhir
|
||||||
#server:
|
server:
|
||||||
# servlet:
|
# servlet:
|
||||||
# context-path: /example/path
|
# context-path: /example/path
|
||||||
|
port: 8080
|
||||||
#Adds the option to go to eg. http://localhost:8080/actuator/health for seeing the running configuration
|
#Adds the option to go to eg. http://localhost:8080/actuator/health for seeing the running configuration
|
||||||
#see https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints
|
#see https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints
|
||||||
management:
|
management:
|
||||||
|
|||||||
Reference in New Issue
Block a user