Skip to content

Commit 378d7eb

Browse files
Merge branch 'release/dspace-cris-2024.02.04.01' into dspace-cris-2024_02_x
# Conflicts: # package.json
2 parents 0912a34 + c1be1a9 commit 378d7eb

6 files changed

Lines changed: 53 additions & 50 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ jobs:
132132
# and load assetstore from a cached copy
133133
- name: Start DSpace REST Backend via Docker (for e2e tests)
134134
run: |
135-
docker compose -f ./docker/docker-compose-ci.yml up -d
136-
docker compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli
135+
docker compose -f ./docker/docker-compose-ci.yml -f ./docker/cli.yml -f ./docker/cli.assetstore.yml up dspace-cli
137136
docker container ls
138137
139138
# Run integration tests via Cypress.io

docker/cli.assetstore.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@ services:
3131
/dspace/bin/dspace index-discovery -b
3232
/dspace/bin/dspace oai import
3333
/dspace/bin/dspace oai clean-cache
34+
networks:
35+
- dspacenet
36+
depends_on:
37+
dspace:
38+
condition: service_healthy

docker/docker-compose-ci.yml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ services:
3535
LOGGING_CONFIG: /dspace/config/log4j2-container.xml
3636
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-4science}/dspace-cris:${DSPACE_VER:-dspace-cris-2024_02_x}-test"
3737
depends_on:
38-
- dspacedb
38+
dspacedb:
39+
condition: service_healthy
40+
dspacesolr:
41+
condition: service_healthy
3942
networks:
4043
- dspacenet
4144
ports:
@@ -45,18 +48,37 @@ services:
4548
tty: true
4649
volumes:
4750
- assetstore:/dspace/assetstore
48-
# Ensure that the database is ready BEFORE starting tomcat
49-
# 1. While a TCP connection to dspacedb port 5432 is not available, continue to sleep
50-
# 2. Then, run database migration to init database tables (including any out-of-order ignored migrations, if any)
51-
# 3. Finally, start DSpace
51+
# Ensure that the database and Solr are ready BEFORE starting tomcat
52+
# 1. Wait for Solr HTTP endpoint to respond
53+
# 2. While a TCP connection to dspacedb port 5432 is not available, continue to sleep
54+
# 3. Then, run database migration to init database tables (including any out-of-order ignored migrations, if any)
55+
# 4. Finally, start DSpace
5256
entrypoint:
5357
- /bin/bash
5458
- '-c'
5559
- |
60+
# Wait for the database to be reachable and healthy
61+
echo "Waiting for database..."
62+
until (echo > /dev/tcp/dspacedb/5432) >/dev/null 2>&1; do
63+
sleep 2
64+
done
65+
echo "Database is reachable"
66+
# Wait for Solr to be ready
67+
echo "Waiting for Solr..."
68+
until curl -s http://dspacesolr:8983/solr/ > /dev/null 2>&1; do
69+
sleep 2
70+
done
71+
echo "Solr is ready"
5672
/dspace/bin/dspace database repair
5773
/dspace/bin/dspace database migrate
5874
/dspace/bin/dspace database migrate ignored
5975
java -XX:+UseParallelGC -XX:MaxRAMPercentage=75 org.springframework.boot.loader.launch.JarLauncher
76+
healthcheck:
77+
test: ["CMD", "curl", "-f", "http://localhost:8080/server/actuator/health/"]
78+
interval: 30s
79+
timeout: 10s
80+
retries: 5
81+
start_period: 60s
6082
# DSpace database container
6183
# NOTE: This is customized to use our loadsql image, so that we are using a database with existing test data
6284
dspacedb:
@@ -80,6 +102,12 @@ services:
80102
volumes:
81103
# Keep Postgres data directory between reboots
82104
- pgdata:/pgdata
105+
healthcheck:
106+
test: ["CMD-SHELL", "pg_isready -U dspace"]
107+
interval: 15s
108+
timeout: 5s
109+
retries: 10
110+
start_period: 30s
83111
# DSpace Solr container
84112
dspacesolr:
85113
container_name: dspacesolr
@@ -118,6 +146,12 @@ services:
118146
precreate-core audit /opt/solr/server/solr/configsets/audit
119147
cp -r /opt/solr/server/solr/configsets/audit/* audit
120148
exec solr -f
149+
healthcheck:
150+
test: ["CMD", "curl", "-f", "http://localhost:8983/solr/"]
151+
interval: 15s
152+
timeout: 5s
153+
retries: 10
154+
start_period: 30s
121155
volumes:
122156
assetstore:
123157
pgdata:
Lines changed: 6 additions & 0 deletions
Loading

src/assets/images/sherpa.logo.icon.svg

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/config/default-app-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ export class DefaultAppConfig implements AppConfig {
298298
path: 'assets/images/ror.logo.icon.svg',
299299
},
300300
{
301-
source: 'sherpa',
302-
path: 'assets/images/sherpa.logo.icon.svg',
301+
source: 'opf',
302+
path: 'assets/images/opf.logo.icon.svg',
303303
},
304304
{
305305
source: 'zdb',

0 commit comments

Comments
 (0)