Skip to content

Commit 492344e

Browse files
committed
Spin up UI and REST on 127.0.0.1
1 parent 20faa40 commit 492344e

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ jobs:
1515
env:
1616
# The ci step will test the dspace-angular code against DSpace REST.
1717
# Direct that step to utilize a DSpace REST service that has been started in docker.
18-
DSPACE_REST_HOST: localhost
18+
DSPACE_REST_HOST: 127.0.0.1
1919
DSPACE_REST_PORT: 8080
2020
DSPACE_REST_NAMESPACE: '/server'
2121
DSPACE_REST_SSL: false
22+
# Spin up UI on 127.0.0.1 to avoid host resolution issues in e2e tests with Node 18+
23+
DSPACE_UI_HOST: 127.0.0.1
2224
# When Chrome version is specified, we pin to a specific version of Chrome
2325
# Comment this out to use the latest release
2426
#CHROME_VERSION: "90.0.4430.212-1"
@@ -147,7 +149,7 @@ jobs:
147149
run: |
148150
nohup yarn run serve:ssr &
149151
printf 'Waiting for app to start'
150-
until curl --output /dev/null --silent --head --fail http://localhost:4000/home; do
152+
until curl --output /dev/null --silent --head --fail http://127.0.0.1:4000/home; do
151153
printf '.'
152154
sleep 2
153155
done
@@ -158,7 +160,7 @@ jobs:
158160
# This step also prints entire HTML of homepage for easier debugging if grep fails.
159161
- name: Verify SSR (server-side rendering)
160162
run: |
161-
result=$(wget -O- -q http://localhost:4000/home)
163+
result=$(wget -O- -q http://127.0.0.1:4000/home)
162164
echo "$result"
163165
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep DSpace
164166

docker/docker-compose-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ services:
2424
# __D__ => "-" (e.g. google__D__metadata => google-metadata)
2525
# dspace.dir, dspace.server.url and dspace.ui.url
2626
dspace__P__dir: /dspace
27-
dspace__P__server__P__url: http://localhost:8080/server
28-
dspace__P__ui__P__url: http://localhost:4000
27+
dspace__P__server__P__url: http://127.0.0.1:8080/server
28+
dspace__P__ui__P__url: http://127.0.0.1:4000
2929
# db.url: Ensure we are using the 'dspacedb' image for our database
3030
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
3131
# solr.server: Ensure we are using the 'dspacesolr' image for Solr

0 commit comments

Comments
 (0)