Skip to content

Commit

Permalink
Merge pull request #13 from icrc/include-extension
Browse files Browse the repository at this point in the history
fix actions
  • Loading branch information
icrc-fdeniger authored Nov 22, 2024
2 parents 5fd772c + b29f273 commit 9376d1e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/publish-openmrs-backend-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Java 11
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: 11
server-id: openmrs-module-fhir2extension # Value of the distributionManagement/repository/id field of the pom.xml

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
Expand All @@ -49,3 +56,5 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
secret-files: |
"m2settings=~/.m2/settings.xml"
7 changes: 5 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1

### Dev Stage
FROM maven:3.8-amazoncorretto-8 AS dev
FROM maven:3.8-amazoncorretto-11 AS dev
WORKDIR /openmrs_distro
RUN mkdir -p /openmrs/distribution/openmrs_core/

Expand All @@ -11,7 +11,10 @@ COPY distro.properties ./
COPY module-create-users ./module-create-users

# Build the distro, but only deploy from the amd64 build
RUN --mount=type=cache,target=/root/.m2 mvn clean install
RUN --mount=type=cache,target=/usr/share/maven/ref/repository --mount=type=secret,id=m2settings,target=/usr/share/maven/ref/settings-docker.xml \
mvn -s /usr/share/maven/ref/settings-docker.xml \
-Dmaven.repo.local=/usr/share/maven/ref/repository \
clean install

RUN cp /openmrs_distro/target/sdk-distro/web/openmrs.war /openmrs/distribution/openmrs_core/

Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ services:
# image: ghcr.io/icrc/openmrs-distro-sso/openmrs-backend-2.5.13:latest
build:
context: backend
secrets:
- m2settings
ports:
- "5005:5005"
restart: "unless-stopped"
Expand Down Expand Up @@ -93,6 +95,10 @@ services:
# KC_HOSTNAME: 10.0.2.2
command: ["start-dev"]

secrets:
m2settings:
file: $HOME/.m2/settings.xml

volumes:
openmrs-data: ~
db-data: ~

0 comments on commit 9376d1e

Please sign in to comment.