Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix actions #13

Merged
merged 1 commit into from
Nov 22, 2024
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
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: ~
Loading