Fix Dockerfile for Angular 13 updates #1613
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References
Related to discussion on Slack where @kshepherd noticed our
dspace-angular
Docker container was only listening onlocalhost
. This caused the UI to be unresponsive unless you accessed it from within the running Docker container (via wget or similar)Description
During the Angular 13 upgrade (#1567), the
yarn serve
command (which is used to run the app in dev mode) was updated to useng serve
(Angular) instead ofnode
. This had the unfortunate side effect of limiting thedspace-angular
docker container to listening only onlocalhost
instead of on0.0.0.0
(default fornode
) becauseng serve
defaults to localhost, see https://angular.io/cli/serveThis small PR fixes our
Dockerfile
to specify--host 0.0.0.0
to ensure it listens to all IP addresses, and not only tolocalhost
.Instructions for Reviewers
Using this PR, try the following:
dspace-angular
Docker container:docker-compose -p d7 -f docker/docker-compose.yml build
docker-compose -p d7 -f docker/docker-compose.yml up -d