Skip to content

Commit

Permalink
Use NAMESPACES from the .env (#727)
Browse files Browse the repository at this point in the history
* Use NAMESPACES from the .env

* Created symbolic link for the tomcat folder

* Updated docker compose files - can load more properties from the `.env`
  • Loading branch information
milanmajchrak authored Nov 20, 2024
1 parent 753594d commit f9f6e62
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
12 changes: 8 additions & 4 deletions docker/docker-compose-rest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ services:
# BE server port
- published: 808${INSTANCE}
target: 8080
host_ip: 127.0.0.1
host_ip: ${HOST_IP:-127.0.0.1}
# original debug port
- published: 800${INSTANCE}
target: 8000
host_ip: 127.0.0.1
host_ip: ${HOST_IP:-127.0.0.1}
# handle binary port as per https://www.handle.net/hnr_support.html (5th paragraph)
- published: 264${INSTANCE}
target: 2641
Expand All @@ -93,6 +93,10 @@ services:
entrypoint:
- /bin/bash
- '-c'
# When customizing the namespace, add the following command to the entrypoint command below (after `while ...`):
# `pushd ../webapps && unlink server && ln -s /dspace/webapps/server/ 'repository#server' && popd`
# This will create a symlink from the webapps directory to the server directory with the custom namespace
# (e.g. /dspace/webapps/server -> /dspace/webapps/repository#server)
- |
while (!</dev/tcp/dspacedb/543${INSTANCE}) > /dev/null 2>&1; do sleep 1; done;
/dspace/bin/dspace database migrate force
Expand All @@ -112,7 +116,7 @@ services:
ports:
- published: 543${INSTANCE}
target: 543${INSTANCE}
host_ip: 127.0.0.1
host_ip: ${HOST_IP:-127.0.0.1}
stdin_open: true
tty: true
volumes:
Expand All @@ -133,7 +137,7 @@ services:
ports:
- published: 898${INSTANCE}
target: 898${INSTANCE}
host_ip: 127.0.0.1
host_ip: ${HOST_IP:-127.0.0.1}
stdin_open: true
tty: true
working_dir: /var/solr/data
Expand Down
13 changes: 7 additions & 6 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ services:
TZ: ${TIMEZONE:-Europe/Bratislava}
DSPACE_UI_SSL: 'false'
DSPACE_UI_HOST: dspace-angular
DSPACE_UI_PORT: 4000
DSPACE_UI_NAMESPACE: /
DSPACE_UI_PORT: ${UI_PORT:-4000}
DSPACE_UI_NAMESPACE: ${DSPACE_UI_NAMESPACE:-/}
DSPACE_REST_SSL: ${DSPACE_SSL:-false}
DSPACE_REST_HOST: ${DSPACE_HOST:-localhost}
DSPACE_REST_PORT: ${DSPACE_REST_PORT}
DSPACE_REST_NAMESPACE: /server
DSPACE_REST_PORT: ${DSPACE_REST_PORT:-8080}
DSPACE_REST_NAMESPACE: ${DSPACE_REST_NAMESPACE:-/server}
image: ${DSPACE_UI_IMAGE:-dataquest/dspace-angular:dspace-7_x}
volumes:
- ./config.prod.yml:/app/config/config.prod.yml
# - ./aai.js:/app/dist/browser/aai.js
# - ./dspace-ui.json:/app/docker/dspace-ui.json:rw
build:
context: ..
Expand All @@ -36,9 +37,9 @@ services:
ports:
- published: 400${INSTANCE}
target: 4000
host_ip: 127.0.0.1
host_ip: ${HOST_IP:-127.0.0.1}
- published: 987${INSTANCE}
target: 987${INSTANCE}
host_ip: 127.0.0.1
host_ip: ${HOST_IP:-127.0.0.1}
stdin_open: true
tty: true

0 comments on commit f9f6e62

Please sign in to comment.