-
Notifications
You must be signed in to change notification settings - Fork 42
Added docker build and quick-start #101
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
Open
mgaffigan
wants to merge
1
commit into
OpenIntegrationEngine:main
Choose a base branch
from
mgaffigan:feature/add-docker
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+442
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # Include any files or directories that you don't want to be copied to your | ||
| # container here (e.g., local build artifacts, temporary files, etc.). | ||
| # | ||
| # For more help, visit the .dockerignore file reference guide at | ||
| # https://docs.docker.com/go/build-context-dockerignore/ | ||
|
|
||
| **/.DS_Store | ||
| **/.classpath | ||
| **/.dockerignore | ||
| **/.env | ||
| **/.factorypath | ||
| **/.git | ||
| **/.gitignore | ||
| **/.idea | ||
| **/.project | ||
| **/.sts4-cache | ||
| **/.settings | ||
| **/.toolstarget | ||
| **/.vs | ||
| **/.vscode | ||
| **/.next | ||
| **/.cache | ||
| **/*.dbmdl | ||
| **/*.jfm | ||
| **/charts | ||
| **/docker-compose* | ||
| **/compose.y*ml | ||
| **/Dockerfile* | ||
| **/secrets.dev.yaml | ||
| **/values.dev.yaml | ||
| **/vendor | ||
| LICENSE | ||
| README.md | ||
| **/*.class | ||
| **/*.iml | ||
| **/*.ipr | ||
| **/*.iws | ||
| **/*.log | ||
| **/.apt_generated | ||
| **/.gradle | ||
| **/.gradletasknamecache | ||
| **/.nb-gradle | ||
| **/.springBeans | ||
| **/build | ||
| **/dist | ||
| **/gradle-app.setting | ||
| **/nbbuild | ||
| **/nbdist | ||
| **/nbproject/private | ||
| **/target | ||
| *.ctxt | ||
| .mtj.tmp | ||
| .mvn/timing.properties | ||
| buildNumber.properties | ||
| dependency-reduced-pom.xml | ||
| hs_err_pid* | ||
| pom.xml.next | ||
| pom.xml.releaseBackup | ||
| pom.xml.tag | ||
| pom.xml.versionsBackup | ||
| release.properties | ||
| replay_pid* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # For developers and contributors | ||
|
|
||
| You can build and run OIE locally, or using Docker. For full documentation see [docs.openintegrationengine.org](https://docs.openintegrationengine.org/engine/contributing.html). | ||
|
|
||
| ## Local Build and Run | ||
|
|
||
| ```bash | ||
| # Install dependencies manually or use https://sdkman.io/ | ||
| sdk env install | ||
|
|
||
| # Build the server | ||
| # NOTE: Building will delete any existing server configuration! | ||
| ant -f server/mirth-build.xml -DdisableSigning=true | ||
|
|
||
| # Run the server | ||
| server/setup/oieserver | ||
|
|
||
| # Connect using Ballista or another launcher at https://localhost:8443 | ||
| ``` | ||
|
|
||
| ## Or Using Docker | ||
|
|
||
| ```bash | ||
| # Build using docker | ||
| docker build -t oie-dev . | ||
|
|
||
| # Start an ephemeral image | ||
| # NOTE: All data will be deleted on stop due to --rm. Use a volume for "real" use. | ||
| docker run --rm -p 8443:8443 oie-dev | ||
|
|
||
| # Connect using Ballista or another launcher at https://localhost:8443 | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| # syntax=docker/dockerfile:1.19.0 | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| # SPDX-FileCopyrightText: 2025 Mitch Gaffigan | ||
|
|
||
mgaffigan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Stages: | ||
| # 1. Builder Stage: Compiles the application and resolves dependencies. Produces | ||
| # JAR files that can be deployed. | ||
| # 1a. Install dependencies | ||
| # 1b. Build the application | ||
| # 2. Runner Stage: Creates a lightweight image that runs the application using the JRE. | ||
|
|
||
| FROM ubuntu:noble-20251013 AS builder | ||
jonbartels marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| WORKDIR /app | ||
| # sdkman requires bash | ||
| SHELL ["/bin/bash", "-c"] | ||
|
|
||
| # Stage 1a: Install dependencies | ||
| # Install necessary tools | ||
| COPY .sdkmanrc . | ||
| RUN apt-get update\ | ||
| && apt-get install -y zip curl\ | ||
| && curl -s "https://get.sdkman.io?ci=true" | bash \ | ||
kpalang marked this conversation as resolved.
Show resolved
Hide resolved
mgaffigan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| && source "$HOME/.sdkman/bin/sdkman-init.sh" && sdk env install \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Stage 1b: Build the application | ||
| # Copy the entire source tree (excluding .dockerignore files), and build | ||
| COPY . . | ||
| WORKDIR /app/server | ||
| RUN source "$HOME/.sdkman/bin/sdkman-init.sh" \ | ||
| && ANT_OPTS="-Dfile.encoding=UTF8" ant -f mirth-build.xml -DdisableSigning=true | ||
|
|
||
| ########################################## | ||
| # | ||
| # Ubuntu JDK Image | ||
| # | ||
| ########################################## | ||
|
|
||
| FROM eclipse-temurin:21.0.9_10-jdk-noble AS jdk-run | ||
|
|
||
| RUN groupadd engine \ | ||
| && usermod -l engine ubuntu \ | ||
| && adduser engine engine \ | ||
| && mkdir -p /opt/engine/appdata \ | ||
| && chown -R engine:engine /opt/engine | ||
|
|
||
| WORKDIR /opt/engine | ||
| COPY --chown=engine:engine --from=builder \ | ||
| --exclude=cli-lib \ | ||
| --exclude=mirth-cli-launcher.jar \ | ||
| --exclude=mccommand \ | ||
| --exclude=manager-lib \ | ||
| --exclude=mirth-manager-launcher.jar \ | ||
| --exclude=mcmanager \ | ||
| /app/server/setup ./ | ||
|
|
||
| VOLUME /opt/engine/appdata | ||
| VOLUME /opt/engine/custom-extensions | ||
| EXPOSE 8443 | ||
|
|
||
| USER engine | ||
| ENTRYPOINT ["./configure-from-env.sh"] | ||
| CMD ["./oieserver"] | ||
|
|
||
| ########################################## | ||
| # | ||
| # Alpine JRE Image | ||
| # | ||
| ########################################## | ||
|
|
||
| FROM eclipse-temurin:21.0.9_10-jre-alpine AS jre-run | ||
|
|
||
| # Alpine does not include bash by default, so we install it | ||
| RUN apk add --no-cache bash | ||
| # useradd and groupadd are not available in Alpine | ||
| RUN addgroup -S engine \ | ||
| && adduser -S -g engine engine \ | ||
| && mkdir -p /opt/engine/appdata \ | ||
| && chown -R engine:engine /opt/engine | ||
|
|
||
| WORKDIR /opt/engine | ||
| COPY --chown=engine:engine --from=builder \ | ||
| --exclude=cli-lib \ | ||
| --exclude=mirth-cli-launcher.jar \ | ||
| --exclude=mccommand \ | ||
| --exclude=manager-lib \ | ||
| --exclude=mirth-manager-launcher.jar \ | ||
| --exclude=mcmanager \ | ||
| /app/server/setup ./ | ||
|
|
||
| VOLUME /opt/engine/appdata | ||
| VOLUME /opt/engine/custom-extensions | ||
|
|
||
| EXPOSE 8443 | ||
|
|
||
| USER engine | ||
| ENTRYPOINT ["./configure-from-env"] | ||
| CMD ["./oieserver"] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.