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

OPSEXP-2722 Add ATS trouter image Dockerfile #7

Merged
merged 14 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
22 changes: 22 additions & 0 deletions ats/trouter/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM java_base

EXPOSE 8095 8443

ARG GROUPNAME
ARG GROUPID
ARG ROUTERUSERNAME
ARG USERID
pmacius marked this conversation as resolved.
Show resolved Hide resolved

ADD ats/trouter/alfresco-transform-router*.jar /opt/app.jar

RUN groupadd -g ${GROUPID} ${GROUPNAME} && \
useradd -u ${USERID} -G ${GROUPNAME} ${ROUTERUSERNAME} && \
pmacius marked this conversation as resolved.
Show resolved Hide resolved
chgrp -R ${GROUPNAME} /opt/app.jar

USER ${ROUTERUSERNAME}

HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=1m \
CMD curl -f http://localhost:8095/actuator/health || exit 1
alxgomz marked this conversation as resolved.
Show resolved Hide resolved

COPY ats/trouter/entrypoint.sh /entrypoint.sh
CMD ["/entrypoint.sh"]
23 changes: 23 additions & 0 deletions ats/trouter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Runtime variables

Sets of variables configurable with your docker image

## trouter

```yaml

transform-router:
image: alfresco-transform-router:YOUR-TAG
environment:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
ACTIVEMQ_URL: nio://activemq:61616
CORE_AIO_URL: http://transform-core-aio:8090
FILE_STORE_URL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file

```
- `JAVA_OPTS` - Additional java options
alxgomz marked this conversation as resolved.
Show resolved Hide resolved
- `CORE_AIO_URL` - Transform Core AIO server
- `ACTIVEMQ_URL` - Alfresco ActiveMQ
- `FILE_STORE_URL` - Alfresco Shared FileStore endpoint
13 changes: 13 additions & 0 deletions ats/trouter/artifacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"artifacts": {
"acs23": [
{
"name": "alfresco-transform-router",
"version": "4.1.3",
"path": "ats/trouter",
"classifier": ".jar",
"group": "org.alfresco"
}
]
}
}
3 changes: 3 additions & 0 deletions ats/trouter/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

exec java $JAVA_OPTS $JAVA_OPTS_CONTAINER_FLAGS -jar /opt/app.jar
alxgomz marked this conversation as resolved.
Show resolved Hide resolved
42 changes: 41 additions & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group "default" {
targets = ["content_service", "enterprise-search"]
targets = ["content_service", "enterprise-search", "ats"]
}

group "content_service" {
Expand All @@ -10,6 +10,10 @@ group "enterprise-search" {
targets = ["search_liveindexing"]
}

group "ats" {
targets = ["ats_trouter"]
}

variable "LABEL_VENDOR" {
default = "Hyland Software, Inc."
}
Expand Down Expand Up @@ -190,3 +194,39 @@ target "search_liveindexing" {
tags = ["${liveindexing.artifact}:latest"]
output = ["type=docker"]
}

variable "TROUTER_GROUPNAME" {
default = "Alfresco"
}

variable "TROUTER_GROUPID" {
default = "1000"
}

variable "TROUTER_ROUTERUSERNAME" {
pmacius marked this conversation as resolved.
Show resolved Hide resolved
default = "trouter"
}

variable "TROUTER_USERID" {
default = "33016"
}
gionn marked this conversation as resolved.
Show resolved Hide resolved

pmacius marked this conversation as resolved.
Show resolved Hide resolved
target "ats_trouter" {
dockerfile = "./ats/trouter/Dockerfile"
inherits = ["java_base"]
contexts = {
java_base = "target:java_base"
}
args = {
GROUPNAME = "${TROUTER_GROUPNAME}"
GROUPID = "${TROUTER_GROUPID}"
ROUTERUSERNAME = "${TROUTER_ROUTERUSERNAME}"
USERID = "${TROUTER_USERID}"
}
labels = {
"org.opencontainers.image.title" = "${PRODUCT_LINE} ATS Trouter"
"org.opencontainers.image.description" = "Alfresco Transform Service Trouter"
}
tags = ["alfresco-transform-router:latest"]
output = ["type=docker"]
}
2 changes: 1 addition & 1 deletion docker-compose/docker-compose-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ services:
start_period: 1m
transform-router:
mem_limit: 512m
image: quay.io/alfresco/alfresco-transform-router:4.1.2
image: alfresco-transform-router:latest
environment:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ services:
start_period: 1m
transform-router:
mem_limit: 512m
image: quay.io/alfresco/alfresco-transform-router:4.1.2
image: alfresco-transform-router:latest
environment:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
Expand Down