Skip to content

Commit 3e11b3c

Browse files
committed
Update production docker compose scripts to correct SSR configuration. This allows production mode to fully work again.
1 parent 6ca170f commit 3e11b3c

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

docker/docker-compose-dist.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@ services:
2222
DSPACE_UI_HOST: dspace-angular
2323
DSPACE_UI_PORT: '4000'
2424
DSPACE_UI_NAMESPACE: /
25-
# NOTE: When running the UI in production mode (which the -dist image does),
26-
# these DSPACE_REST_* variables MUST point at a public, HTTPS URL.
27-
# This is because Server Side Rendering (SSR) currently requires a public URL,
28-
# see this bug: https://github.com/DSpace/dspace-angular/issues/1485
29-
DSPACE_REST_SSL: 'true'
30-
DSPACE_REST_HOST: sandbox.dspace.org
31-
DSPACE_REST_PORT: 443
25+
DSPACE_REST_SSL: 'false'
26+
DSPACE_REST_HOST: localhost
27+
DSPACE_REST_PORT: 8080
3228
DSPACE_REST_NAMESPACE: /server
29+
# Ensure SSR can use the 'dspace' Docker image directly (see docker-compose-rest.yml)
30+
DSPACE_REST_SSRBASEURL: http://dspace:8080/server
3331
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-angular:${DSPACE_VER:-latest}-dist"
3432
build:
3533
context: ..

docker/docker-compose-rest.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ services:
3535
# Uncomment to set a non-default value for dspace.server.url or dspace.ui.url
3636
# dspace__P__server__P__url: http://localhost:8080/server
3737
# dspace__P__ui__P__url: http://localhost:4000
38+
# Set SSR URL to the Docker container name so that UI can contact container directly in Production mode.
39+
# (This is necessary for docker-compose-dist.yml)
40+
dspace__P__server__P__ssr__P__url: http://dspace:8080/server
3841
dspace__P__name: 'DSpace Started with Docker Compose'
3942
# db.url: Ensure we are using the 'dspacedb' image for our database
4043
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'

0 commit comments

Comments
 (0)