Skip to content

Commit

Permalink
Add Alfresco Connector MSTeams Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius committed Aug 9, 2024
1 parent 96dfcfd commit 112e162
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 1 deletion.
19 changes: 19 additions & 0 deletions connector/msteams/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM java_base

EXPOSE 9095

ARG ALFRESCO_MSTEAMS_GROUP_NAME
ARG ALFRESCO_MSTEAMS_GROUP_ID
ARG ALFRESCO_MSTEAMS_USER_NAME
ARG ALFRESCO_MSTEAMS_USER_ID

ADD alfresco-ms-teams-springboot*.jar /opt/app.jar

RUN groupadd -g ${ALFRESCO_MSTEAMS_GROUP_ID} ${ALFRESCO_MSTEAMS_GROUP_NAME} && \
useradd -u ${ALFRESCO_MSTEAMS_USER_ID} -g ${ALFRESCO_MSTEAMS_GROUP_NAME} ${ALFRESCO_MSTEAMS_USER_NAME} && \
chgrp ${ALFRESCO_MSTEAMS_GROUP_NAME} /opt/app.jar

USER ${ALFRESCO_MSTEAMS_USER_NAME}

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

Sets of variables configurable with your docker image

## msteams

```yaml

alfresco-connector-msteams:
image: localhost/alfresco-ms-teams-service:YOUR-TAG
environment:
JAVA_OPTS:
ALFRESCO_BASE_URL:
ALFRESCO_DIGITAL_WORKSPACE_CONTEXT_PATH:
MICROSOFT_APP_OAUTH_CONNECTION_NAME:
MICROSOFT_APP_ID:
MICROSOFT_APP_PASSWORD:
TEAMS_CHAT_FILENAME_ENABLED:
TEAMS_CHAT_METADATA_ENABLED:
TEAMS_CHAT_IMAGE_ENABLED:
```
- `JAVA_OPTS` - Additional java options
- `ACS_BASE_URL` - The base URL of the Content Services installation in the format `<domain>:<port>`. For example, {my.domain}/
- `ALFRESCO_DIGITAL_WORKSPACE_CONTEXT_PATH` - The Alfresco Digital Workspace context path in the Content Services installation, usually /workspace
- `MICROSOFT_APP_OAUTH_CONNECTION_NAME` - OAuth Connection name
- `MICROSOFT_APP_ID` - The Azure Bot application identifier created when registering the Azure bot and looks something like `9af7ae3a-1798-4de7-a992-c3ac48****`
- `MICROSOFT_APP_PASSWORD` - The Azure Bot application password
- `TEAMS_CHAT_FILENAME_ENABLED` - Enables or disables the inclusion of filenames in Teams chat messages. Set to `true` to include filenames, or `false` to exclude them.
- `TEAMS_CHAT_METADATA_ENABLED` - Enables or disables the inclusion of metadata in Teams chat messages. Set to `true` to include metadata, or `false` to exclude it.
- `TEAMS_CHAT_IMAGE_ENABLED` - Enables or disables the inclusion of images in Teams chat messages. Set to `true` to include images, or `false` to exclude them.
14 changes: 14 additions & 0 deletions connector/msteams/artifacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"artifacts": {
"acs23": [
{
"name": "alfresco-ms-teams-springboot",
"version": "2.0.2",
"path": "connector/msteams",
"classifier": ".jar",
"repository": "enterprise-releases",
"group": "org.alfresco"
}
]
}
}
2 changes: 2 additions & 0 deletions connector/msteams/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
exec java $JAVA_OPTS -jar /opt/app.jar
35 changes: 34 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", "ats", "tengines"]
targets = ["content_service", "enterprise-search", "ats", "tengines", "connectors"]
}

group "content_service" {
Expand All @@ -18,6 +18,10 @@ group "tengines" {
targets = ["tengine_libreoffice", "tengine_imagemagick", "tengine_tika", "tengine_pdfrenderer", "tengine_misc", "tengine_aio"]
}

group "connectors" {
targets = ["connector_msteams"]
}

variable "LABEL_VENDOR" {
default = "Hyland Software, Inc."
}
Expand Down Expand Up @@ -455,3 +459,32 @@ target "tengine_aio" {
tags = ["localhost/alfresco-transform-core-aio:latest"]
output = ["type=docker"]
}

variable "ALFRESCO_MSTEAMS_USER_NAME" {
default = "ms-int-user"
}

variable "ALFRESCO_MSTEAMS_USER_ID" {
default = "33041"
}

target "connector_msteams" {
context = "./connector/msteams"
dockerfile = "Dockerfile"
inherits = ["java_base"]
contexts = {
java_base = "target:java_base"
}
args = {
ALFRESCO_MSTEAMS_GROUP_NAME = "${ALFRESCO_GROUP_NAME}"
ALFRESCO_MSTEAMS_GROUP_ID = "${ALFRESCO_GROUP_ID}"
ALFRESCO_MSTEAMS_USER_NAME = "${ALFRESCO_MSTEAMS_USER_NAME}"
ALFRESCO_MSTEAMS_USER_ID = "${ALFRESCO_MSTEAMS_USER_ID}"
}
labels = {
"org.opencontainers.image.title" = "${PRODUCT_LINE} Connector Microsoft Teams"
"org.opencontainers.image.description" = "Alfresco Connector Microsoft Teams"
}
tags = ["localhost/alfresco-ms-teams-service:latest"]
output = ["type=docker"]
}

0 comments on commit 112e162

Please sign in to comment.