From 048fe8c6013e55615c59c20a249160800a1a29b9 Mon Sep 17 00:00:00 2001 From: pmacius Date: Wed, 18 Sep 2024 09:21:01 +0200 Subject: [PATCH] add docs --- share/README.md | 62 ++++++++++++++++++++++++++++++++++++ share/amps/README.md | 24 ++++++++++++++ share/distribution/README.md | 1 + 3 files changed, 87 insertions(+) diff --git a/share/README.md b/share/README.md index e69de29b..a80547af 100644 --- a/share/README.md +++ b/share/README.md @@ -0,0 +1,62 @@ +# Alfresco share image + +## Description + +This Docker file is used to build an Alfresco share image. + +## Building the image + +Make sure all required artifacts are present in the build context `share/`. +You can put them manually in the `share/` folder (for example if that's a +custom module of yours), or use the script `./scripts/fetch-artifacts.sh` to +download them from Alfresco's Nexus. + +Then, you can build the image from the root of this git repository with the +following command: + +```bash +docker buildx bake share +``` + +## Running the image + +### Alfresco share configuration + +All preperties 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 +variable: + +```bash +docker run -e JAVA_OPTS="-Dalfresco.host=localhost" \ + alfresco-share:mytag +``` + +Example set of variables for docker-compose file: + +```yaml + +alfresco-connector-ms365: + image: localhost/alfresco-share:YOUR-TAG + environment: + JAVA_OPTS: "" + REPO_HOST: alfresco + REPO_PORT: 8080 + CSRF_FILTER_REFERER: + CSRF_FILTER_ORIGIN: + USE_SSL: false + +``` + +- `JAVA_OPTS` - A set of properties that are picked up by the JVM inside the container +- `REPO_HOST` - Share needs to know how to register itself with Alfresco. The default value is `localhost` +- `REPO_PORT` - Share needs to know how to register itself with Alfresco. The default value is `8080` +- `CSRF_FILTER_REFERER` - CSRF Referrer +- `CSRF_FILTER_ORIGIN` - CSRF Origin +- `USE_SSL` - Enables ssl use if set to `true`. The default value is `false` + + +> If the image is meant to be used with the Alfresco Content Services Helm +> chart, you can use other [higher level means of +> configuration](https://github.com/Alfresco/alfresco-helm-charts/blob/main/charts/alfresco-share/README.md). diff --git a/share/amps/README.md b/share/amps/README.md index e69de29b..3d487643 100644 --- a/share/amps/README.md +++ b/share/amps/README.md @@ -0,0 +1,24 @@ +# Alfresco share AMPs + +Place here your Alfresco module Packages (AMPs) to be installed in the Alfresco +share. + +AMP packages should have the `.amp` extension and stick to the Alfresco module +packaging format as described in the [Alfresco +documentation](https://docs.alfresco.com/content-services/latest/develop/extension-packaging/#alfresco-module-package-amp). + +The [in-process Alfresco +SDK](https://docs.alfresco.com/content-services/latest/develop/sdk/) provides a +way to build well structured AMPs. + +> Note that AMPs are not the recommanded way to extend Alfresco. You should +> prefer using the Alfresco SDK to build your extensions as JARs even better, +> use the [out-of-process Alfresco +> SDK](https://docs.alfresco.com/content-services/latest/develop/oop-sdk/) to +> build Docker images with your extensions. + +By default the `scripts/fetch-artifacts.sh` script will fetch the following AMPs from the Alfresco Nexus repository: + +* alfresco-googledrive-share + +You can replace those, remove them to keep only the ones you need or add more. diff --git a/share/distribution/README.md b/share/distribution/README.md index 9172a562..9d4de3fb 100644 --- a/share/distribution/README.md +++ b/share/distribution/README.md @@ -15,3 +15,4 @@ web-server/ |_Catalina/ |_localhost/ ``` +Do changes to `share-config-custom.xml` according to your needs.