Skip to content

Commit 09c00d1

Browse files
authored
Merge pull request #5283 from tdonohue/port_5280_to_8x
[Port dspace-8_x] [Docker] Update all Docker Compose scripts to allow for environment variable overrides
2 parents b2e5d1a + 6620198 commit 09c00d1

File tree

8 files changed

+37
-37
lines changed

8 files changed

+37
-37
lines changed

docker/cli.assetstore.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
dspace-cli:
1717
environment:
1818
# This assetstore zip is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
19-
- LOADASSETS=https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/assetstore.tar.gz
19+
- LOADASSETS=${LOADASSETS:-https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/assetstore.tar.gz}
2020
entrypoint:
2121
- /bin/bash
2222
- '-c'

docker/cli.ingest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
services:
1616
dspace-cli:
1717
environment:
18-
- AIPZIP=https://github.com/DSpace-Labs/AIP-Files/raw/main/dogAndReport.zip
19-
- ADMIN_EMAIL=test@test.edu
20-
- AIPDIR=/tmp/aip-dir
18+
- AIPZIP=${AIPZIP:-https://github.com/DSpace-Labs/AIP-Files/raw/main/dogAndReport.zip}
19+
- ADMIN_EMAIL=${ADMIN_EMAIL:-test@test.edu}
20+
- AIPDIR=${AIPDIR:-/tmp/aip-dir}
2121
entrypoint:
2222
- /bin/bash
2323
- '-c'

docker/cli.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ services:
2929
# __P__ => "." (e.g. dspace__P__dir => dspace.dir)
3030
# __D__ => "-" (e.g. google__D__metadata => google-metadata)
3131
# db.url: Ensure we are using the 'dspacedb' image for our database
32-
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
32+
db__P__url: ${db__P__url:-jdbc:postgresql://dspacedb:5432/dspace}
3333
# solr.server: Ensure we are using the 'dspacesolr' image for Solr
34-
solr__P__server: http://dspacesolr:8983/solr
34+
solr__P__server: ${solr__P__server:-http://dspacesolr:8983/solr}
3535
networks:
3636
- dspacenet
3737
volumes:

docker/db.entities.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
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
2121
# NOTE: currently there is no dspace8 version
22-
- LOADSQL=https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-data.sql
22+
- LOADSQL=${LOADSQL:-https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-data.sql}
2323
dspace:
2424
### OVERRIDE default 'entrypoint' in 'docker-compose-rest.yml' ####
2525
# Ensure that the database is ready BEFORE starting tomcat

docker/docker-compose-ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ services:
2222
# __P__ => "." (e.g. dspace__P__dir => dspace.dir)
2323
# __D__ => "-" (e.g. google__D__metadata => google-metadata)
2424
# dspace.dir, dspace.server.url and dspace.ui.url
25-
dspace__P__dir: /dspace
26-
dspace__P__server__P__url: http://127.0.0.1:8080/server
27-
dspace__P__ui__P__url: http://127.0.0.1:4000
25+
dspace__P__dir: ${dspace__P__dir:-/dspace}
26+
dspace__P__server__P__url: ${dspace__P__server__P__url:-http://127.0.0.1:8080/server}
27+
dspace__P__ui__P__url: ${dspace__P__ui__P__url:-http://127.0.0.1:4000}
2828
# db.url: Ensure we are using the 'dspacedb' image for our database
29-
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
29+
db__P__url: ${db__P__url:-jdbc:postgresql://dspacedb:5432/dspace}
3030
# solr.server: Ensure we are using the 'dspacesolr' image for Solr
31-
solr__P__server: http://dspacesolr:8983/solr
31+
solr__P__server: ${solr__P__server:-http://dspacesolr:8983/solr}
3232
# Tell Statistics to commit all views immediately instead of waiting on Solr's autocommit.
3333
# This allows us to generate statistics in e2e tests so that statistics pages can be tested thoroughly.
34-
solr__D__statistics__P__autoCommit: 'false'
35-
LOGGING_CONFIG: /dspace/config/log4j2-container.xml
34+
solr__D__statistics__P__autoCommit: ${solr__D__statistics__P__autoCommit:-false}
35+
LOGGING_CONFIG: ${LOGGING_CONFIG:-/dspace/config/log4j2-container.xml}
3636
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-dspace-8_x-test}"
3737
depends_on:
3838
- dspacedb

docker/docker-compose-dist.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ services:
1818
dspace-angular:
1919
container_name: dspace-angular
2020
environment:
21-
DSPACE_UI_SSL: 'false'
22-
DSPACE_UI_HOST: dspace-angular
23-
DSPACE_UI_PORT: '4000'
24-
DSPACE_UI_NAMESPACE: /
25-
DSPACE_REST_SSL: 'false'
26-
DSPACE_REST_HOST: localhost
27-
DSPACE_REST_PORT: 8080
28-
DSPACE_REST_NAMESPACE: /server
21+
DSPACE_UI_SSL: ${DSPACE_UI_SSL:-false}
22+
DSPACE_UI_HOST: ${DSPACE_UI_HOST:-dspace-angular}
23+
DSPACE_UI_PORT: ${DSPACE_UI_PORT:-4000}
24+
DSPACE_UI_NAMESPACE: ${DSPACE_UI_NAMESPACE:-/}
25+
DSPACE_REST_SSL: ${DSPACE_REST_SSL:-false}
26+
DSPACE_REST_HOST: ${DSPACE_REST_HOST:-localhost}
27+
DSPACE_REST_PORT: ${DSPACE_REST_PORT:-8080}
28+
DSPACE_REST_NAMESPACE: ${DSPACE_REST_NAMESPACE:-/server}
2929
# Ensure SSR can use the 'dspace' Docker image directly (see docker-compose-rest.yml)
30-
DSPACE_REST_SSRBASEURL: http://dspace:8080/server
30+
DSPACE_REST_SSRBASEURL: ${DSPACE_REST_SSRBASEURL:-http://dspace:8080/server}
3131
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-angular:${DSPACE_VER:-dspace-8_x}-dist"
3232
build:
3333
context: ..

docker/docker-compose-rest.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ services:
3636
# dspace__P__ui__P__url: http://localhost:4000
3737
# Set SSR URL to the Docker container name so that UI can contact container directly in Production mode.
3838
# (This is necessary for docker-compose-dist.yml)
39-
dspace__P__server__P__ssr__P__url: http://dspace:8080/server
40-
dspace__P__name: 'DSpace Started with Docker Compose'
39+
dspace__P__server__P__ssr__P__url: ${dspace__P__server__P__ssr__P__url:-http://dspace:8080/server}
40+
dspace__P__name: ${dspace__P__name:-DSpace Started with Docker Compose}
4141
# db.url: Ensure we are using the 'dspacedb' image for our database
42-
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
42+
db__P__url: ${db__P__url:-jdbc:postgresql://dspacedb:5432/dspace}
4343
# solr.server: Ensure we are using the 'dspacesolr' image for Solr
44-
solr__P__server: http://dspacesolr:8983/solr
44+
solr__P__server: ${solr__P__server:-http://dspacesolr:8983/solr}
4545
# proxies.trusted.ipranges: This setting is required for a REST API running in Docker to trust requests
4646
# from the host machine. This IP range MUST correspond to the 'dspacenet' subnet defined above.
47-
proxies__P__trusted__P__ipranges: '172.23.0'
48-
LOGGING_CONFIG: /dspace/config/log4j2-container.xml
47+
proxies__P__trusted__P__ipranges: ${proxies__P__trusted__P__ipranges:-172.23.0}
48+
LOGGING_CONFIG: ${LOGGING_CONFIG:-/dspace/config/log4j2-container.xml}
4949
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-dspace-8_x-test}"
5050
depends_on:
5151
- dspacedb

docker/docker-compose.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ services:
1919
dspace-angular:
2020
container_name: dspace-angular
2121
environment:
22-
DSPACE_UI_SSL: 'false'
23-
DSPACE_UI_HOST: dspace-angular
24-
DSPACE_UI_PORT: '4000'
25-
DSPACE_UI_NAMESPACE: /
26-
DSPACE_REST_SSL: 'false'
27-
DSPACE_REST_HOST: localhost
28-
DSPACE_REST_PORT: 8080
29-
DSPACE_REST_NAMESPACE: /server
22+
DSPACE_UI_SSL: ${DSPACE_UI_SSL:-false}
23+
DSPACE_UI_HOST: ${DSPACE_UI_HOST:-dspace-angular}
24+
DSPACE_UI_PORT: ${DSPACE_UI_PORT:-4000}
25+
DSPACE_UI_NAMESPACE: ${DSPACE_UI_NAMESPACE:-/}
26+
DSPACE_REST_SSL: ${DSPACE_REST_SSL:-false}
27+
DSPACE_REST_HOST: ${DSPACE_REST_HOST:-localhost}
28+
DSPACE_REST_PORT: ${DSPACE_REST_PORT:-8080}
29+
DSPACE_REST_NAMESPACE: ${DSPACE_REST_NAMESPACE:-/server}
3030
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-angular:${DSPACE_VER:-dspace-8_x}"
3131
build:
3232
context: ..

0 commit comments

Comments
 (0)