Skip to content

Commit

Permalink
OPSEXP-2728 Add T-engine misc image Dockerfile (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius authored Aug 5, 2024
1 parent 4596061 commit 8db641e
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 6 deletions.
30 changes: 29 additions & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ group "ats" {
}

group "tengines" {
targets = ["tengine_libreoffice", "tengine_imagemagick", "tengine_tika", "tengine_pdfrenderer"]
targets = ["tengine_libreoffice", "tengine_imagemagick", "tengine_tika", "tengine_pdfrenderer", "tengine_misc"]
}

variable "LABEL_VENDOR" {
Expand Down Expand Up @@ -333,6 +333,34 @@ target "tengine_libreoffice" {
output = ["type=docker"]
}

variable "ALFRESCO_MISC_USER_NAME" {
default = "transform-misc"
}

variable "ALFRESCO_MISC_USER_ID" {
default = "33006"
}

target "tengine_misc" {
dockerfile = "./tengine/misc/Dockerfile"
inherits = ["java_base"]
contexts = {
java_base = "target:java_base"
}
args = {
ALFRESCO_MISC_GROUP_NAME = "${ALFRESCO_GROUP_NAME}"
ALFRESCO_MISC_GROUP_ID = "${ALFRESCO_GROUP_ID}"
ALFRESCO_MISC_USER_NAME = "${ALFRESCO_MISC_USER_NAME}"
ALFRESCO_MISC_USER_ID = "${ALFRESCO_MISC_USER_ID}"
}
labels = {
"org.opencontainers.image.title" = "${PRODUCT_LINE} Transform Engine Misc"
"org.opencontainers.image.description" = "Alfresco Transform Engine Misc"
}
tags = ["localhost/alfresco-misc:latest"]
output = ["type=docker"]
}

variable "ALFRESCO_TIKA_USER_NAME" {
default = "tika"
}
Expand Down
2 changes: 2 additions & 0 deletions tengine/imagemagick/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ transform-core-imagemagick:
environment:
JAVA_OPTS:
ACTIVEMQ_URL: nio://activemq:61616
ACTIVEMQ_USER: admin
ACTIVEMQ_PASSWORD: admin
FILE_STORE_URL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file

```
Expand Down
2 changes: 2 additions & 0 deletions tengine/libreoffice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ transform-core-libreoffice:
environment:
JAVA_OPTS:
ACTIVEMQ_URL: nio://activemq:61616
ACTIVEMQ_USER: admin
ACTIVEMQ_PASSWORD: admin
FILE_STORE_URL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file

```
Expand Down
25 changes: 25 additions & 0 deletions tengine/misc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM java_base

ENV MISC_COMMON_PATH=tengine/misc
ENV JAVA_OPTS_CONTAINER_FLAGS=-XX:MaxRAMPercentage=80

EXPOSE 8090

ARG ALFRESCO_MISC_GROUP_NAME
ARG ALFRESCO_MISC_GROUP_ID
ARG ALFRESCO_MISC_USER_NAME
ARG ALFRESCO_MISC_USER_ID

ADD ${MISC_COMMON_PATH}/alfresco-transform-misc*.jar /opt/app.jar

RUN groupadd -g ${ALFRESCO_MISC_GROUP_ID} ${ALFRESCO_MISC_GROUP_NAME} && \
useradd -u ${ALFRESCO_MISC_USER_ID} -g ${ALFRESCO_MISC_GROUP_NAME} ${ALFRESCO_MISC_USER_NAME} && \
chgrp ${ALFRESCO_MISC_GROUP_NAME} /opt/app.jar

USER ${ALFRESCO_MISC_USER_NAME}

HEALTHCHECK --interval=20s --timeout=10s --retries=3 --start-period=30s \
CMD curl -f http://localhost:8090/live || exit 1

COPY ${MISC_COMMON_PATH}/entrypoint.sh /entrypoint.sh
CMD ["/entrypoint.sh"]
22 changes: 22 additions & 0 deletions tengine/misc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Runtime variables

Sets of variables configurable with your docker image

## misc

```yaml

transform-core-misc:
image: localhost/alfresco-misc:YOUR-TAG
environment:
JAVA_OPTS:
ACTIVEMQ_URL: nio://activemq:61616
ACTIVEMQ_USER: admin
ACTIVEMQ_PASSWORD: admin
FILE_STORE_URL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file

```

- `JAVA_OPTS` - Additional java options
- `ACTIVEMQ_URL` - The URL for Alfresco ActiveMQ.
- `FILE_STORE_URL` - Alfresco Shared FileStore endpoint.
14 changes: 14 additions & 0 deletions tengine/misc/artifacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"artifacts": {
"acs23": [
{
"name": "alfresco-transform-misc",
"version": "5.1.3",
"path": "tengine/misc",
"classifier": ".jar",
"repository": "releases",
"group": "org.alfresco"
}
]
}
}
2 changes: 2 additions & 0 deletions tengine/misc/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
exec java $JAVA_OPTS $JAVA_OPTS_CONTAINER_FLAGS -jar /opt/app.jar
13 changes: 8 additions & 5 deletions test/helm/test-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ alfresco-transform-service:
image:
repository: localhost/alfresco-imagemagick
tag: latest
# libreoffice:
# image:
# repository: localhost/alfresco-libreoffice
# tag: latest
#libreoffice:
#image:
# repository: localhost/alfresco-libreoffice
# tag: latest
transformmisc:
image:
repository: localhost/alfresco-misc
tag: latest
tika:
image:
repository: localhost/alfresco-tika
tag: latest
#transformmisc:
transformrouter:
image:
repository: localhost/alfresco-transform-router
Expand Down

0 comments on commit 8db641e

Please sign in to comment.