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

feat/ui-docker-container-builds #7149

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
435ca8e
adding basic docker container
gilesw Nov 29, 2024
5899a76
missing newrelic config
gilesw Nov 29, 2024
6e70747
json entrypoint recommendation
gilesw Nov 29, 2024
9e067ea
allow frontend to be configured separately to web
gilesw Nov 29, 2024
ecc70ca
add postgres, redis, haproxy lb containers for dev
gilesw Nov 29, 2024
184bf2d
Merge branch 'main' into feat/ui-docker-container-builds
amontenegro Dec 2, 2024
3c4e09a
Merge branch 'main' into feat/ui-docker-container-builds
amontenegro Dec 3, 2024
036c286
missing env files
gilesw Dec 4, 2024
c170a93
Merge branch 'feat/ui-docker-container-builds' of github.com:ORCID/OR…
gilesw Dec 4, 2024
58795ec
ro only perms as full write causes startup error
gilesw Dec 4, 2024
f8923a7
drop yaml markers in env files
gilesw Dec 5, 2024
d8dad88
feat: add haproxy router for database connections and use static ips …
gilesw Dec 5, 2024
b338281
Fix the code so the app can start with an empty identifer_type table
amontenegro Dec 5, 2024
4e27c0d
Merge branch 'feat/ui-docker-container-builds' of https://github.com/…
amontenegro Dec 5, 2024
97f89bc
Adding users
amontenegro Dec 5, 2024
a99373d
Client added
amontenegro Dec 5, 2024
5485d4d
migrating back to a defined bridged network
gilesw Dec 6, 2024
1ab8139
Merge branch 'feat/ui-docker-container-builds' of github.com:ORCID/OR…
gilesw Dec 6, 2024
991c872
adding orcid-haprouter to the builds
gilesw Dec 6, 2024
34085f5
adding in haprouter as default postgres connection
gilesw Dec 6, 2024
8ae0c47
cleaner overridable haprouter config
gilesw Dec 9, 2024
935a391
default.env is transfered via anisble not dev.env
gilesw Dec 9, 2024
4de984c
default.env is transfered via anisble not dev.env
gilesw Dec 9, 2024
37453e2
Update passphrase
amontenegro Dec 9, 2024
60a1eff
Merge branch 'feat/ui-docker-container-builds' of https://github.com/…
amontenegro Dec 9, 2024
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
4 changes: 4 additions & 0 deletions .github/workflows/bld_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ jobs:
docker_name: orcid/registry/orcid-web-proxy
file: orcid-web-proxy/Dockerfile

- artifact_name: orcid-haprouter
docker_name: orcid/registry/orcid-haprouter
file: orcid-haprouter/Dockerfile

runs-on: ubuntu-latest
steps:
- name: git-checkout-ref-action
Expand Down
100 changes: 100 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# dependencies docker build

# match version from .tool-versions
FROM maven:3.6.3-jdk-11 AS maven

ARG tag_numeric

WORKDIR /build

# copy only poms for max cachability of just dependency downloads
COPY pom.xml .
COPY orcid-core/pom.xml orcid-core/pom.xml
COPY orcid-persistence/pom.xml orcid-persistence/pom.xml
COPY orcid-utils/pom.xml orcid-utils/pom.xml
COPY orcid-test/pom.xml orcid-test/pom.xml
COPY orcid-api-common/pom.xml orcid-api-common/pom.xml
COPY orcid-scheduler-web/pom.xml orcid-scheduler-web/pom.xml
COPY orcid-api-web/pom.xml orcid-api-web/pom.xml
COPY orcid-message-listener/pom.xml orcid-message-listener/pom.xml
COPY orcid-core/pom.xml orcid-core/pom.xml
COPY orcid-web/pom.xml orcid-web/pom.xml
COPY orcid-internal-api/pom.xml orcid-internal-api/pom.xml
COPY orcid-pub-web/pom.xml orcid-pub-web/pom.xml
COPY orcid-activemq/pom.xml orcid-activemq/pom.xml

# FIXME: these dont seem required?
#COPY orcid-web-frontend/pom.xml orcid-web-frontend/pom.xml
#COPY orcid-activities-indexer/pom.xml orcid-activities-indexer/pom.xml
#COPY orcid-nodejs/pom.xml orcid-nodejs/pom.xml

# download maven dependencies and ignore that some components will fail
RUN mvn -T 1C --batch-mode dependency:resolve --fail-never -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

# install orcid-parent into our local maven repo because the builds depend a version tagged release
RUN mvn -T 1C --batch-mode --non-recursive clean install -DskipTests \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

# install orcid-utils into our local maven repo because the builds depend a version tagged release
COPY orcid-utils/src orcid-utils/src
RUN mvn -T 1C --batch-mode --projects orcid-utils clean install -DskipTests \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

# install orcid-test into our local maven repo because orcid-persistence depends on it
COPY orcid-test/src orcid-test/src
RUN mvn -T 1C --batch-mode --projects orcid-test clean install -DskipTests \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

# install orcid-persistence into our local maven repo because orcid-core depends on it
COPY orcid-persistence/src orcid-persistence/src
RUN mvn -T 1C --batch-mode --projects orcid-persistence clean install -DskipTests \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

# install orcid-core into our local maven repo because the builds depend a version tagged release
COPY orcid-core/src orcid-core/src
RUN mvn -T 1C --batch-mode --projects orcid-core clean install -DskipTests \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

# install orcid-api-common into our local maven repo because orcid-web deploy depends a version tagged release
COPY orcid-api-common/src orcid-api-common/src
RUN mvn -T 1C --batch-mode --projects orcid-api-common clean install -DskipTests \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

##################################################################################
COPY orcid-web/src orcid-web/src
RUN mvn -T 1C --batch-mode -DgenerateBackupPoms=false \
--projects orcid-web -am package -DskipTests \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

# For Java 11 and Tomcat 9
FROM tomcat:9.0.93-jdk11-temurin-jammy

# Focal has no j2cli support
# FROM tomcat:9.0.91-jdk11-temurin-focal

# copy jar file from build
COPY --from=maven /build/*/target/*.war /usr/local/tomcat/webapps/orcid-web.war

RUN mkdir -p /usr/local/tomcat/newrelic
COPY newrelic.yml /usr/local/tomcat/newrelic/newrelic.yml
RUN curl -L -s https://download.newrelic.com/newrelic/java-agent/newrelic-agent/8.13.0/newrelic-agent-8.13.0.jar -o /usr/local/tomcat/newrelic/newrelic.jar

RUN apt-get update
RUN apt-get install -y j2cli

# add orcid ca to allow Java application to trust other containers
ADD certs/cacerts /opt/java/openjdk/lib/security/cacerts

# add orcid ca to system to allow curl healthchecks to work
ADD certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt


COPY entrypoint.sh .
RUN chmod +x ./entrypoint.sh

COPY orcid-web/*.j2 .

COPY orcid-web/log4j2.xml .

ENTRYPOINT ./entrypoint.sh

Empty file added certs/DONE.state
Empty file.
Loading
Loading