Skip to content

Commit 574adc8

Browse files
committed
Ensure Docker Compose uses Runnable JAR. Minor bug fixes to loadsql per DSpace#2966
1 parent 0e61cfd commit 574adc8

3 files changed

Lines changed: 8 additions & 20 deletions

File tree

docker/db.entities.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# # Therefore, it should be kept in sync with that file
1515
services:
1616
dspacedb:
17-
image: dspace/dspace-postgres-pgcrypto:loadsql
17+
image: dspace/dspace-postgres-pgcrypto::${DSPACE_VER:-latest}-loadsql
1818
environment:
1919
# This LOADSQL should be kept in sync with the URL in DSpace/DSpace
2020
# This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
@@ -27,23 +27,11 @@ services:
2727
# 3. (Custom for Entities) enable Entity-specific collection submission mappings in item-submission.xml
2828
# This 'sed' command inserts the sample configurations specific to the Entities data set, see:
2929
# https://github.com/DSpace/DSpace/blob/main/dspace/config/item-submission.xml#L36-L49
30-
# 4. Finally, start Tomcat
30+
# 4. Finally, start DSpace
3131
entrypoint:
3232
- /bin/bash
3333
- '-c'
3434
- |
3535
while (!</dev/tcp/dspacedb/5432) > /dev/null 2>&1; do sleep 1; done;
3636
/dspace/bin/dspace database migrate ignored
37-
sed -i '/name-map collection-handle="default".*/a \\n <name-map collection-handle="123456789/3" submission-name="Publication"/> \
38-
<name-map collection-handle="123456789/4" submission-name="Publication"/> \
39-
<name-map collection-handle="123456789/281" submission-name="Publication"/> \
40-
<name-map collection-handle="123456789/5" submission-name="Publication"/> \
41-
<name-map collection-handle="123456789/8" submission-name="OrgUnit"/> \
42-
<name-map collection-handle="123456789/6" submission-name="Person"/> \
43-
<name-map collection-handle="123456789/279" submission-name="Person"/> \
44-
<name-map collection-handle="123456789/7" submission-name="Project"/> \
45-
<name-map collection-handle="123456789/280" submission-name="Project"/> \
46-
<name-map collection-handle="123456789/28" submission-name="Journal"/> \
47-
<name-map collection-handle="123456789/29" submission-name="JournalVolume"/> \
48-
<name-map collection-handle="123456789/30" submission-name="JournalIssue"/>' /dspace/config/item-submission.xml
49-
catalina.sh run
37+
java -jar /dspace/webapps/server-boot.jar --dspace.dir=/dspace

docker/docker-compose-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ services:
4848
# Ensure that the database is ready BEFORE starting tomcat
4949
# 1. While a TCP connection to dspacedb port 5432 is not available, continue to sleep
5050
# 2. Then, run database migration to init database tables (including any out-of-order ignored migrations, if any)
51-
# 3. Finally, start Tomcat
51+
# 3. Finally, start DSpace
5252
entrypoint:
5353
- /bin/bash
5454
- '-c'
5555
- |
5656
while (!</dev/tcp/dspacedb/5432) > /dev/null 2>&1; do sleep 1; done;
5757
/dspace/bin/dspace database migrate ignored
58-
catalina.sh run
58+
java -jar /dspace/webapps/server-boot.jar --dspace.dir=/dspace
5959
# DSpace database container
6060
# NOTE: This is customized to use our loadsql image, so that we are using a database with existing test data
6161
dspacedb:
6262
container_name: dspacedb
63-
image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest-loadsql}"
63+
image: "${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-latest}-loadsql"
6464
environment:
6565
# This LOADSQL should be kept in sync with the LOADSQL in
6666
# https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/db.entities.yml

docker/docker-compose-rest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ services:
5656
# Ensure that the database is ready BEFORE starting tomcat
5757
# 1. While a TCP connection to dspacedb port 5432 is not available, continue to sleep
5858
# 2. Then, run database migration to init database tables
59-
# 3. Finally, start Tomcat
59+
# 3. Finally, start DSpace
6060
entrypoint:
6161
- /bin/bash
6262
- '-c'
6363
- |
6464
while (!</dev/tcp/dspacedb/5432) > /dev/null 2>&1; do sleep 1; done;
6565
/dspace/bin/dspace database migrate
66-
catalina.sh run
66+
java -jar /dspace/webapps/server-boot.jar --dspace.dir=/dspace
6767
# DSpace database container
6868
dspacedb:
6969
container_name: dspacedb

0 commit comments

Comments
 (0)