From 9ed9d63d94ce38951bf929be6e104a4f533b503f Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Fri, 8 Nov 2024 13:31:33 +0100 Subject: [PATCH 1/3] Updated docker compose and aai.js to work properly with `namespace` and update docker compose files following current customisation. --- docker/docker-compose-rest.yml | 17 ++++++++--------- docker/docker-compose.yml | 13 +++++++------ src/aai/aai.js | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docker/docker-compose-rest.yml b/docker/docker-compose-rest.yml index 55543984ccb..18ce7ef4142 100644 --- a/docker/docker-compose-rest.yml +++ b/docker/docker-compose-rest.yml @@ -40,9 +40,6 @@ services: db__P__url: 'jdbc:postgresql://dspacedb:543${INSTANCE}/dspace' # solr.server: Ensure we are using the 'dspacesolr' image for Solr solr__P__server: http://dspacesolr:898${INSTANCE}/solr - # proxies.trusted.ipranges: This setting is required for a REST API running in Docker to trust requests - # from the host machine. This IP range MUST correspond to the 'dspacenet' subnet defined above. - proxies__P__trusted__P__ipranges: '172.2${INSTANCE}.0' #S3 config assetstore__P__index__P__primary: ${S3_STORAGE:-0} assetstore__P__s3__P__enabled: ${S3_ENABLED:-false} @@ -63,11 +60,11 @@ services: # BE server port - published: 808${INSTANCE} target: 8080 - host_ip: 127.0.0.1 + host_ip: ${HOST_IP:-127.0.0.1} # original debug port - published: 800${INSTANCE} target: 8000 - host_ip: 127.0.0.1 + host_ip: ${HOST_IP:-127.0.0.1} # handle binary port as per https://www.handle.net/hnr_support.html (5th paragraph) - published: 264${INSTANCE} target: 2641 @@ -80,7 +77,8 @@ services: tty: true volumes: - dspace_logs:/dspace/log - - assetstore:/dspace/assetstore + - #assetstore:/dspace/assetstore + - /opt/DATA/assetstore:/dspace/assetstore # Mount DSpace's solr configs to a volume, so that we can share to 'dspacesolr' container (see below) - solr_configs:/dspace/solr - handle_server:/dspace/handle-server @@ -95,6 +93,7 @@ services: - '-c' - | while (! /dev/null 2>&1; do sleep 1; done; + pushd ../webapps && unlink server && ln -s /dspace/webapps/server/ 'repository#server' && popd /dspace/bin/dspace database migrate force custom_run.sh /dspace/bin/start-handle-server @@ -112,7 +111,7 @@ services: ports: - published: 543${INSTANCE} target: 543${INSTANCE} - host_ip: 127.0.0.1 + host_ip: ${HOST_IP:-127.0.0.1} stdin_open: true tty: true volumes: @@ -133,7 +132,7 @@ services: ports: - published: 898${INSTANCE} target: 898${INSTANCE} - host_ip: 127.0.0.1 + host_ip: ${HOST_IP:-127.0.0.1} stdin_open: true tty: true working_dir: /var/solr/data @@ -164,7 +163,7 @@ services: cp -r -u /opt/solr/server/solr/configsets/dspace/statistics/* statistics exec solr -p 898${INSTANCE} -f -m 4g volumes: - assetstore: + #assetstore: pgdata: solr_data: # Special volume used to share Solr configs from 'dspace' to 'dspacesolr' container (see above) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 001a6b91b0a..55d2354204c 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -17,15 +17,16 @@ services: TZ: ${TIMEZONE:-Europe/Bratislava} DSPACE_UI_SSL: 'false' DSPACE_UI_HOST: dspace-angular - DSPACE_UI_PORT: 4000 - DSPACE_UI_NAMESPACE: / + DSPACE_UI_PORT: ${UI_PORT:-4000} + DSPACE_UI_NAMESPACE: ${DSPACE_UI_NAMESPACE:-/} DSPACE_REST_SSL: ${DSPACE_SSL:-false} DSPACE_REST_HOST: ${DSPACE_HOST:-localhost} - DSPACE_REST_PORT: ${DSPACE_REST_PORT} - DSPACE_REST_NAMESPACE: /server + DSPACE_REST_PORT: ${DSPACE_REST_PORT:-8080} + DSPACE_REST_NAMESPACE: ${DSPACE_REST_NAMESPACE:-/server} image: ${DSPACE_UI_IMAGE:-dataquest/dspace-angular:dspace-7_x} volumes: - ./config.prod.yml:/app/config/config.prod.yml + - ./aai.js:/app/dist/browser/aai.js # - ./dspace-ui.json:/app/docker/dspace-ui.json:rw build: context: .. @@ -36,9 +37,9 @@ services: ports: - published: 400${INSTANCE} target: 4000 - host_ip: 127.0.0.1 + host_ip: ${HOST_IP:-127.0.0.1} - published: 987${INSTANCE} target: 987${INSTANCE} - host_ip: 127.0.0.1 + host_ip: ${HOST_IP:-127.0.0.1} stdin_open: true tty: true diff --git a/src/aai/aai.js b/src/aai/aai.js index d669631e6eb..730e8c6b725 100644 --- a/src/aai/aai.js +++ b/src/aai/aai.js @@ -3,7 +3,7 @@ function AAI() { var host = 'https://' + window.location.hostname, ourEntityID = host.match("lindat.mff.cuni.cz") ? "https://ufal-point.mff.cuni.cz" : host; - var namespace = ''; + var namespace = 'repository'; this.defaults = { //host : 'https://ufal-point.mff.cuni.cz', host : host, //better default (useful when testing on ufal-point-dev) From d4b6459c076d9847da1086dedaac317f52402733 Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Wed, 20 Nov 2024 15:41:30 +0100 Subject: [PATCH 2/3] Added doc and undo one removal because it is not needed to remove --- docker/docker-compose-rest.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/docker-compose-rest.yml b/docker/docker-compose-rest.yml index 18ce7ef4142..c0ce3479cb7 100644 --- a/docker/docker-compose-rest.yml +++ b/docker/docker-compose-rest.yml @@ -40,6 +40,9 @@ services: db__P__url: 'jdbc:postgresql://dspacedb:543${INSTANCE}/dspace' # solr.server: Ensure we are using the 'dspacesolr' image for Solr solr__P__server: http://dspacesolr:898${INSTANCE}/solr + # proxies.trusted.ipranges: This setting is required for a REST API running in Docker to trust requests + # from the host machine. This IP range MUST correspond to the 'dspacenet' subnet defined above. + proxies__P__trusted__P__ipranges: '172.2${INSTANCE}.0' #S3 config assetstore__P__index__P__primary: ${S3_STORAGE:-0} assetstore__P__s3__P__enabled: ${S3_ENABLED:-false} @@ -163,6 +166,7 @@ services: cp -r -u /opt/solr/server/solr/configsets/dspace/statistics/* statistics exec solr -p 898${INSTANCE} -f -m 4g volumes: + # Commented out because there are a lot of files in the assetstore #assetstore: pgdata: solr_data: From b6057e9ea33bbbe17ddec24a7af042fd67d59cdc Mon Sep 17 00:00:00 2001 From: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:05:18 +0100 Subject: [PATCH 3/3] Removed two IT: (#737) 1. Author does not have a two input fields. 2. Test for checking the notice step will be transformed into UI test, because we do not want to keep such specific collection for generic IT. --- cypress/e2e/submission-ui.cy.ts | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/cypress/e2e/submission-ui.cy.ts b/cypress/e2e/submission-ui.cy.ts index db41ba66756..63c8ec79d9d 100644 --- a/cypress/e2e/submission-ui.cy.ts +++ b/cypress/e2e/submission-ui.cy.ts @@ -230,18 +230,6 @@ describe('Create a new submission', () => { createItemProcess.showErrorNotSupportedLicense(); }); - // Author field should consist of two input fields - it('Author field should consist of two input fields', { - retries: { - runMode: 6, - openMode: 6, - }, - defaultCommandTimeout: 10000 - },() => { - createItemProcess.checkAuthorFirstnameField(); - createItemProcess.checkAuthorLastnameField(); - }); - it('The submission should not have the Notice Step', { retries: { runMode: 6, @@ -261,16 +249,6 @@ describe('Create a new submission in the clariah collection', () => { // This page is restricted, so we will be shown the login form. Fill it out & submit. cy.loginViaForm(TEST_ADMIN_USER, TEST_ADMIN_PASSWORD); }); - - it('The submission should have the Notice Step', { - retries: { - runMode: 6, - openMode: 6, - }, - defaultCommandTimeout: 10000 - },() => { - createItemProcess.checkClarinNoticeStep(); - }); }); function addEUSponsor(euSponsorOrder) {