From 22e34c4fe64c974a2cd8095419a99008490fc8b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Maciusiak?= <158472457+pmacius@users.noreply.github.com> Date: Thu, 18 Jul 2024 09:56:46 +0200 Subject: [PATCH] OPSEXP-2734 Add search enterprise path image Dockerfile (#2) --- .github/workflows/build_and_test.yml | 13 ++++++++++--- docker-compose/docker-compose.yml | 5 +++++ search/enterprise/README.md | 15 +++++++++++++++ search/enterprise/{metadata => common}/Dockerfile | 4 ++-- .../enterprise/{metadata => common}/entrypoint.sh | 0 5 files changed, 32 insertions(+), 5 deletions(-) rename search/enterprise/{metadata => common}/Dockerfile (68%) rename search/enterprise/{metadata => common}/entrypoint.sh (100%) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index e2ade56c..3089ad97 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -11,7 +11,13 @@ jobs: - artifact: alfresco-elasticsearch-live-indexing-metadata version: 4.0.1 name: alfresco-enterprise-search-metadata - path: search/enterprise/metadata + path: search/enterprise/common + classifier: -app.jar + group: org.alfresco + - artifact: alfresco-elasticsearch-live-indexing-path + version: 4.0.1 + name: alfresco-enterprise-search-path + path: search/enterprise/common classifier: -app.jar group: org.alfresco @@ -64,7 +70,7 @@ jobs: - name: Upload image as a tar for next job uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # 4.3.4 with: - name: images + name: ${{ matrix.images.name }}-${{ github.run_number }} path: /tmp/${{ matrix.images.name }}.tar compose: @@ -78,8 +84,9 @@ jobs: - name: Download artifacts uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8 with: - name: images path: /tmp + pattern: "*-${{ github.run_number }}" + merge-multiple: true - name: Load Docker images run: | diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 12a0c11c..a52d5d14 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -186,6 +186,11 @@ services: environment: SPRING_ELASTICSEARCH_REST_URIS: http://elastic:9200 SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + live-indexing-path: + image: alfresco-enterprise-search-path:test + environment: + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 volumes: shared-file-store-volume: driver_opts: diff --git a/search/enterprise/README.md b/search/enterprise/README.md index ea229842..ca5c17c9 100644 --- a/search/enterprise/README.md +++ b/search/enterprise/README.md @@ -16,3 +16,18 @@ live-indexing-metadata: - `SPRING_ELASTICSEARCH_REST_URIS` - Elasticsearch server, by default `http://elasticsearch:9200` - `SPRING_ACTIVEMQ_BROKERURL` - Alfresco ActiveMQ, by default `nio://activemq:61616` + +## path + +```yaml + +live-indexing-path: + image: alfresco-enterprise-search-path:YOUR-TAG + environment: + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + +``` + +- `SPRING_ELASTICSEARCH_REST_URIS` - Elasticsearch server, by default `http://elasticsearch:9200` +- `SPRING_ACTIVEMQ_BROKERURL` - Alfresco ActiveMQ, by default `nio://activemq:61616` diff --git a/search/enterprise/metadata/Dockerfile b/search/enterprise/common/Dockerfile similarity index 68% rename from search/enterprise/metadata/Dockerfile rename to search/enterprise/common/Dockerfile index cba8b51b..e0ec51da 100644 --- a/search/enterprise/metadata/Dockerfile +++ b/search/enterprise/common/Dockerfile @@ -3,10 +3,10 @@ FROM quay.io/alfresco/alfresco-base-java:jre17-rockylinux9 ENV PORT=8080 EXPOSE 8080 -ADD search/enterprise/metadata/*-app.jar /opt/app.jar +ADD search/enterprise/common/*-app.jar /opt/app.jar HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=1m \ CMD curl -f http://localhost:8080/actuator/health || exit 1 -COPY search/enterprise/metadata/entrypoint.sh /entrypoint.sh +COPY search/enterprise/common/entrypoint.sh /entrypoint.sh CMD ["/entrypoint.sh"] diff --git a/search/enterprise/metadata/entrypoint.sh b/search/enterprise/common/entrypoint.sh similarity index 100% rename from search/enterprise/metadata/entrypoint.sh rename to search/enterprise/common/entrypoint.sh