diff --git a/docker-bake.hcl b/docker-bake.hcl index 943b1db2..05dc2461 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -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" { @@ -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" } diff --git a/tengine/imagemagick/README.md b/tengine/imagemagick/README.md index db161058..75696b6d 100644 --- a/tengine/imagemagick/README.md +++ b/tengine/imagemagick/README.md @@ -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 ``` diff --git a/tengine/libreoffice/README.md b/tengine/libreoffice/README.md index 35c66140..d26182d3 100644 --- a/tengine/libreoffice/README.md +++ b/tengine/libreoffice/README.md @@ -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 ``` diff --git a/tengine/misc/Dockerfile b/tengine/misc/Dockerfile new file mode 100644 index 00000000..13d3387d --- /dev/null +++ b/tengine/misc/Dockerfile @@ -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"] diff --git a/tengine/misc/README.md b/tengine/misc/README.md new file mode 100644 index 00000000..782c1e23 --- /dev/null +++ b/tengine/misc/README.md @@ -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. diff --git a/tengine/misc/artifacts.json b/tengine/misc/artifacts.json new file mode 100644 index 00000000..0bcd5c03 --- /dev/null +++ b/tengine/misc/artifacts.json @@ -0,0 +1,14 @@ +{ + "artifacts": { + "acs23": [ + { + "name": "alfresco-transform-misc", + "version": "5.1.3", + "path": "tengine/misc", + "classifier": ".jar", + "repository": "releases", + "group": "org.alfresco" + } + ] + } +} diff --git a/tengine/misc/entrypoint.sh b/tengine/misc/entrypoint.sh new file mode 100755 index 00000000..158a2a1e --- /dev/null +++ b/tengine/misc/entrypoint.sh @@ -0,0 +1,2 @@ +#!/bin/bash +exec java $JAVA_OPTS $JAVA_OPTS_CONTAINER_FLAGS -jar /opt/app.jar diff --git a/test/helm/test-overrides.yaml b/test/helm/test-overrides.yaml index 96ba304d..c7c9914f 100644 --- a/test/helm/test-overrides.yaml +++ b/test/helm/test-overrides.yaml @@ -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