Skip to content

Commit

Permalink
build repository community edition
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn committed Oct 3, 2024
1 parent 6c97363 commit 1259925
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 14 deletions.
25 changes: 22 additions & 3 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,33 @@ target "repository" {
ALFRESCO_REPO_GROUP_NAME = "${ALFRESCO_GROUP_NAME}"
ALFRESCO_REPO_USER_ID = "${ALFRESCO_REPO_USER_ID}"
ALFRESCO_REPO_USER_NAME = "${ALFRESCO_REPO_USER_NAME}"
ALFRESCO_REPO_ARTIFACT = "${repository_editions.artifact}"
ALFRESCO_REPO_EDITION = "${repository_editions.name}"
}
labels = {
"org.opencontainers.image.title" = "${PRODUCT_LINE} Content Repository"
"org.opencontainers.image.description" = "Alfresco Content Services Repository"
"org.opencontainers.image.title" = "${PRODUCT_LINE} Content Repository (${repository_editions.name})"
"org.opencontainers.image.description" = "Alfresco Content Services Repository ${repository_editions.name} edition"
}
tags = ["${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-content-repository:${TAG}"]
tags = ["${REGISTRY}/${REGISTRY_NAMESPACE}/${repository_editions.image_name}:${TAG}"]
output = ["type=docker"]
platforms = split(",", "${TARGETARCH}")

name = "${repository_editions.name}"

matrix = {
repository_editions = [
{
artifact = "alfresco-content-services-community-distribution",
image_name = "alfresco-content-repository-community",
name = "community"
},
{
artifact = "alfresco-content-services-distribution",
image_name = "alfresco-content-repository",
name = "enterprise"
}
]
}
}

target "search_liveindexing" {
Expand Down
6 changes: 5 additions & 1 deletion repository/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ ARG ALFRESCO_REPO_GROUP_ID

FROM tomcat_base AS repo_build

ARG ALFRESCO_REPO_ARTIFACT
ARG ALFRESCO_REPO_EDITION

USER root
RUN yum install -y unzip

ADD distribution /tmp/
ADD distribution/${ALFRESCO_REPO_ARTIFACT}-*.zip /tmp/
ENV DISTDIR="/tmp/distribution"

RUN unzip /tmp/*.zip -d ${DISTDIR}
Expand All @@ -29,6 +32,7 @@ RUN sed -i \
${CATALINA_HOME}/webapps/alfresco/WEB-INF/classes/log4j2.properties

ADD amps /tmp/amps
ADD amps_${ALFRESCO_REPO_EDITION} /tmp/amps
ADD libs ${CATALINA_HOME}/lib/
RUN if [ -f /tmp/amps/alfresco-aos-module-*.amp ]; then umask 0027; \
unzip ${DISTDIR}/web-server/webapps/ROOT.war -d ${CATALINA_HOME}/webapps/ROOT/; \
Expand Down
2 changes: 1 addition & 1 deletion repository/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ docker buildx bake repository

### Alfresco repository configuration

All preperties you would normally add in the alfresco-global.properties file can
All properties you would normally add in the alfresco-global.properties file can
be added in the `JAVA_OPTS` environment variable to the container.

For example, to set the database URL, you can use the following environment
Expand Down
1 change: 0 additions & 1 deletion repository/amps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ By default the `scripts/fetch-artifacts.sh` script will fetch the following AMPs
* alfresco-aos-module
* alfresco-device-sync-repo
* alfresco-googledrive-repo-enterprise
* alfresco-content-services-distribution

You can replace those, remove them to keep only the ones you need or add more.
Be careful though as some AMPs may depend on one another (e.g.
Expand Down
Empty file.
Empty file.
12 changes: 10 additions & 2 deletions repository/artifacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
{
"name": "alfresco-device-sync-repo",
"version": "5.0.0",
"path": "repository/amps",
"path": "repository/amps_enterprise",
"classifier": ".amp",
"group": "org.alfresco.services.sync",
"repository": "enterprise-releases"
},
{
"name": "alfresco-googledrive-repo-enterprise",
"version": "4.1.0",
"path": "repository/amps",
"path": "repository/amps_enterprise",
"classifier": ".amp",
"group": "org.alfresco.integrations",
"repository": "enterprise-releases"
Expand All @@ -48,6 +48,14 @@
"classifier": ".zip",
"group": "org.alfresco",
"repository": "enterprise-releases"
},
{
"name": "alfresco-content-services-community-distribution",
"version": "23.2.0",
"path": "repository/distribution",
"classifier": ".zip",
"group": "org.alfresco",
"repository": "public"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion share/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG DISTRIB_NAME
ARG DISTRIB_MAJOR
FROM tomcat_base as share_build
FROM tomcat_base AS share_build

USER root
EXPOSE 8000
Expand Down
5 changes: 0 additions & 5 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Do not move this file to a folder that is not a first level folder
version: "2"
services:
alfresco:
image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-content-repository:${TAG}
Expand All @@ -19,10 +18,6 @@ services:
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbc:postgresql://postgres:5432/alfresco
-Dindex.subsystem.name=elasticsearch
-Delasticsearch.createIndexIfNotExists=true
-Delasticsearch.host=elasticsearch
-Delasticsearch.port=9200
-Dshare.host=127.0.0.1
-Dshare.port=8080
-Dalfresco.host=localhost
Expand Down

0 comments on commit 1259925

Please sign in to comment.