Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/Dockerfile_PreBuild
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
FROM jetty:9.4-jdk11-alpine
FROM gcr.io/distroless/java:11

ENV JMX_EXPORTER_VERSION=1.2.0

# To enable add "-javaagent:$JETTY_BASE/jmx-exporter.jar=8090:$JETTY_BASE/prometheus_config.yml" to the JAVA_OPTIONS
RUN wget https://github.com/prometheus/jmx_exporter/releases/download/$JMX_EXPORTER_VERSION/jmx_prometheus_javaagent-$JMX_EXPORTER_VERSION.jar -o /var/lib/jetty/jmx-exporter.jar
COPY .github/jmx_exporter.config /var/lib/jetty/prometheus_config.yml
# Copy OBP source code
# Copy build artifact (.war file) into jetty from 'maven' stage.
COPY /obp-api/target/obp-api-1.*.war /var/lib/jetty/webapps/ROOT.war
COPY /obp-http4s-runner/target/obp-http4s-runner.jar /app/obp-http4s-runner.jar
WORKDIR /app
CMD ["obp-http4s-runner.jar"]
9 changes: 0 additions & 9 deletions .github/Dockerfile_PreBuild_Jmx

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/build_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ jobs:
**/target/site/surefire-report.html
**/target/site/surefire-report/*

- name: Save .war artifact
- name: Save .jar artifact
continue-on-error: true
run: |
mkdir -p ./push
cp obp-api/target/obp-api-1.*.war ./push/
cp obp-http4s-runner/target/obp-http4s-runner.jar ./push/
- uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ jobs:
**/target/site/surefire-report.html
**/target/site/surefire-report/*

- name: Save .war artifact
- name: Save .jar artifact
run: |
mkdir -p ./pull
cp obp-api/target/obp-api-1.*.war ./pull/
cp obp-http4s-runner/target/obp-http4s-runner.jar ./pull/
- uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}
Expand Down
8 changes: 5 additions & 3 deletions obp-api/src/main/scala/bootstrap/http4s/Http4sServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ object Http4sServer extends IOApp {
// new bootstrap.http4s.Http4sBoot().boot
new bootstrap.liftweb.Boot().boot

val port = APIUtil.getPropsAsIntValue("http4s.port",8086)
val host = APIUtil.getPropsValue("http4s.host","127.0.0.1")

val port = APIUtil.getPropsAsIntValue("http4s.port",8080)
// Default changed from 127.0.0.1 to 0.0.0.0 so the server binds to all network interfaces.
// It is still configurable via the http4s.host property.
val host = APIUtil.getPropsValue("http4s.host","0.0.0.0")

// Use shared httpApp configuration (same as tests)
val httpApp = Http4sApp.httpApp

Expand Down