From 2cec7ff45aa590168108dec4ee479ee6a2e76692 Mon Sep 17 00:00:00 2001 From: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:34:06 +0100 Subject: [PATCH] Update docker-compose-rest.yml - Updated symlink command and custom_run.sh path --- docker/docker-compose-rest.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/docker-compose-rest.yml b/docker/docker-compose-rest.yml index ad90815f7ed..fe771aa33d2 100644 --- a/docker/docker-compose-rest.yml +++ b/docker/docker-compose-rest.yml @@ -95,14 +95,16 @@ services: - /bin/bash - '-c' # When customizing the namespace, add the following command to the entrypoint command below (after `while ...`): - # `pushd ../webapps && unlink server && ln -s /dspace/webapps/server/ 'repository#server' && popd` + # `pushd ../webapps && (unlink server || true) && (ln -s /dspace/webapps/server/ 'repository#server' || true) && popd` + # The `(... || true)` condition is necessary to ensure the `popd` command runs at the end. + # It used to fail when the `server` folder did not exist in `/webapps`. # This will create a symlink from the webapps directory to the server directory with the custom namespace # (e.g. /dspace/webapps/server -> /dspace/webapps/repository#server) - | while (! /dev/null 2>&1; do sleep 1; done; - pushd ../webapps && unlink server && ln -s /dspace/webapps/server/ 'repository#server' && popd + pushd ../webapps && (unlink server || true) && (ln -s /dspace/webapps/server/ 'repository#server' || true) && popd /dspace/bin/dspace database migrate force - custom_run.sh + ./custom_run.sh /dspace/bin/start-handle-server # DSpace database container dspacedb: