Skip to content

Commit

Permalink
Changed default deployment port for Spring Boot build to 8888
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels Wolters committed Feb 15, 2024
1 parent b733197 commit 6673b57
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"**/.settings": true,
"**/.factorypath": true
},
"java.compile.nullAnalysis.mode": "disabled"
"java.compile.nullAnalysis.mode": "disabled",
"java.configuration.updateBuildConfiguration": "automatic"
}
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,16 @@ public class YourInterceptor

The easiest way to run this server entirely depends on your environment requirements. At least, the following 4 ways are supported:

### Using jetty
### Using jetty (only default port 8080 possible)
[15-02-2024] We only managed to run the server through the Jetty servlet on the default port [localhost:8080](http:https://localhost:8080/):

```bash
mvn -Pjetty jetty:run
```

Go to section 'Using Spring Boot' to run on a different port.

<strike>
If you need to run this server on a different port (using Maven), you can change the port in the run command as follows:

```bash
Expand All @@ -214,6 +218,7 @@ Server will then be accessible at http:https://localhost:8888/ and eg. http:https://localhos
refuse_to_fetch_third_party_urls: false
fhir_version: R4
```
</strike>

### Using Spring Boot with :run
```bash
Expand Down Expand Up @@ -246,6 +251,25 @@ Server will then be accessible at http:https://localhost:8080/ and eg. http:https://localhos
refuse_to_fetch_third_party_urls: false
fhir_version: R4
```

If you want to run on a different port, for example 8888, add the following lines to your application.yaml file:

```yaml
server:
port: 8888
```
And adjust the overlay configuration in the same file:

```yaml
tester:
-
id: home
name: Local Tester
server_address: 'http:https://localhost:8888/fhir'
refuse_to_fetch_third_party_urls: false
fhir_version: R4
```

### Using Spring Boot and Google distroless
```bash
mvn clean package com.google.cloud.tools:jib-maven-plugin:dockerBuild -Dimage=distroless-hapi && docker run -p 8080:8080 distroless-hapi
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public class AppProperties {

private Boolean cr_enabled = false;
private Boolean ips_enabled = true;
private Boolean ips_enabled = false;
private Boolean openapi_enabled = false;
private Boolean mdm_enabled = false;
private String mdm_rules_json_location = "mdm-rules.json";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package ca.uhn.fhir.jpa.starter.ips;

import ca.uhn.fhir.jpa.ips.strategy.DefaultIpsGenerationStrategy;

import org.hl7.fhir.instance.model.api.IBaseResource;

// TODO: Implement the ZorgRotondeIpsGenerationStrategy class
// public class ZorgRotondeIpsGenerationStrategy extends DefaultIpsGenerationStrategy {

// @Override
// public IBaseResource createAuthor(){
// return new IBaseResource() {

// };
// }


// }


4 changes: 3 additions & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ management:
web:
exposure:
include: "health,prometheus"
server:
port: 8888
spring:
main:
allow-circular-references: true
Expand Down Expand Up @@ -191,7 +193,7 @@ hapi:
tester:
home:
name: Local Tester
server_address: 'http:https://localhost:8080/fhir'
server_address: 'http:https://localhost:8888/fhir'
refuse_to_fetch_third_party_urls: false
fhir_version: R4
global:
Expand Down

0 comments on commit 6673b57

Please sign in to comment.