Skip to content

Commit 72b699b

Browse files
authored
Merge pull request DSpace#11744 from tdonohue/port_11742_to_8x
[Port dspace-8_x][Docker] Minor cleanup to Docker Compose scripts to align with frontend changes and run UI in production mode
2 parents d016716 + 878efcb commit 72b699b

6 files changed

Lines changed: 11 additions & 18 deletions

File tree

docker-compose-cli.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ services:
2626
# Mount local [src]/dspace/config/ to container. This syncs your local configs with container
2727
# NOTE: Environment variables specified above will OVERRIDE any configs in local.cfg or dspace.cfg
2828
- ./dspace/config:/dspace/config
29-
tty: true
30-
stdin_open: true
3129

3230
volumes:
3331
assetstore:

docker-compose.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ networks:
55
# Define a custom subnet for our DSpace network, so that we can easily trust requests from host to container.
66
# If you customize this value, be sure to customize the 'proxies.trusted.ipranges' env variable below.
77
- subnet: 172.23.0.0/16
8+
# Explicitly set external=false because this script creates the network.
9+
external: false
810
services:
911
# DSpace (backend) webapp container
1012
dspace:
@@ -18,6 +20,9 @@ services:
1820
# dspace__P__dir: /dspace
1921
# dspace__P__server__P__url: http://localhost:8080/server
2022
# dspace__P__ui__P__url: http://localhost:4000
23+
# Set SSR URL to the Docker container name so that UI can contact container directly in Production mode.
24+
# (This is necessary for docker-compose-angular.yml as it uses production mode by default)
25+
dspace__P__server__P__ssr__P__url: http://dspace:8080/server
2126
dspace__P__name: 'DSpace Started with Docker Compose'
2227
# db.url: Ensure we are using the 'dspacedb' image for our database
2328
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
@@ -40,8 +45,6 @@ services:
4045
target: 8080
4146
- published: 8000
4247
target: 8000
43-
stdin_open: true
44-
tty: true
4548
volumes:
4649
# Keep DSpace assetstore directory between reboots
4750
- assetstore:/dspace/assetstore
@@ -75,8 +78,6 @@ services:
7578
ports:
7679
- published: 5432
7780
target: 5432
78-
stdin_open: true
79-
tty: true
8081
volumes:
8182
# Keep Postgres data directory between reboots
8283
- pgdata:/pgdata
@@ -96,8 +97,6 @@ services:
9697
ports:
9798
- published: 8983
9899
target: 8983
99-
stdin_open: true
100-
tty: true
101100
working_dir: /var/solr/data
102101
volumes:
103102
# Keep Solr data directory between reboots

dspace/src/main/docker-compose/db.entities.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
services:
1010
dspacedb:
11-
image: dspace/dspace-postgres-pgcrypto:${DSPACE_VER:-dspace-8_x}-loadsql
11+
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-dspace-8_x}-loadsql"
1212
environment:
1313
# This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
1414
- LOADSQL=https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-data.sql

dspace/src/main/docker-compose/db.restore.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# This can be used to restore a "dspacedb" container from a pg_dump, or during upgrade to a new version of PostgreSQL.
1313
services:
1414
dspacedb:
15-
image: dspace/dspace-postgres-pgcrypto:${DSPACE_VER:-dspace-8_x}-loadsql
15+
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-postgres-pgcrypto:${DSPACE_VER:-dspace-8_x}-loadsql"
1616
environment:
1717
# Location where the dump SQL file will be available on the running container
1818
- LOCALSQL=/tmp/pgdump.sql

dspace/src/main/docker-compose/docker-compose-angular.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ services:
2626
DSPACE_REST_HOST: localhost
2727
DSPACE_REST_PORT: 8080
2828
DSPACE_REST_NAMESPACE: /server
29-
image: dspace/dspace-angular:${DSPACE_VER:-dspace-8_x}
29+
# Ensure SSR can use the 'dspace' Docker image directly (see docker-compose-rest.yml)
30+
DSPACE_REST_SSRBASEURL: http://dspace:8080/server
31+
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-angular:${DSPACE_VER:-dspace-8_x-dist}"
3032
ports:
3133
- published: 4000
3234
target: 4000
33-
- published: 9876
34-
target: 9876
35-
stdin_open: true
36-
tty: true

dspace/src/main/docker-compose/docker-compose-shibboleth.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
container_name: dspace-shibboleth
2222
depends_on:
2323
- dspace
24-
image: dspace/dspace-shibboleth
24+
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-shibboleth"
2525
build:
2626
# Must be relative to root, so that it can be built alongside [src]/docker-compose.yml
2727
context: ./dspace/src/main/docker/dspace-shibboleth
@@ -30,8 +30,6 @@ services:
3030
target: 80
3131
- published: 443
3232
target: 443
33-
stdin_open: true
34-
tty: true
3533
environment:
3634
# Default to using "localhost" for Apache & Shibboleth
3735
# However, you can override this via the "DSPACE_HOSTNAME" environment variable.

0 commit comments

Comments
 (0)