File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details
33
44FROM node:18-alpine
5- WORKDIR /app
6- ADD . /app/
7- EXPOSE 4000
85
96# Ensure Python and other build tools are available
107# These are needed to install some node modules, especially on linux/arm64
118RUN apk add --update python3 make g++ && rm -rf /var/cache/apk/*
129
10+ WORKDIR /app
11+ ADD . /app/
12+ EXPOSE 4000
13+
1314# We run yarn install with an increased network timeout (5min) to avoid "ESOCKETTIMEDOUT" errors from hub.docker.com
1415# See, for example https://github.com/yarnpkg/yarn/issues/5540
1516RUN yarn install --network-timeout 300000
1617
18+ # When running in dev mode, 4GB of memory is required to build & launch the app.
19+ # This default setting can be overridden as needed in your shell, via an env file or in docker-compose.
20+ # See Docker environment var precedence: https://docs.docker.com/compose/environment-variables/envvars-precedence/
21+ ENV NODE_OPTIONS="--max_old_space_size=4096"
22+
1723# On startup, run in DEVELOPMENT mode (this defaults to live reloading enabled, etc).
1824# Listen / accept connections from all IP addresses.
1925# NOTE: At this time it is only possible to run Docker container in Production mode
20- # if you have a public IP. See https://github.com/DSpace/dspace-angular/issues/1485
26+ # if you have a public URL. See https://github.com/DSpace/dspace-angular/issues/1485
27+ ENV NODE_ENV development
2128CMD yarn serve --host 0.0.0.0
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ services:
1919 DSPACE_UI_HOST : dspace-angular
2020 DSPACE_UI_PORT : ' 4000'
2121 DSPACE_UI_NAMESPACE : /
22+ # NOTE: When running the UI in production mode (which the -dist image does),
23+ # these DSPACE_REST_* variables MUST point at a public, HTTPS URL.
24+ # This is because Server Side Rendering (SSR) currently requires a public URL,
25+ # see this bug: https://github.com/DSpace/dspace-angular/issues/1485
2226 DSPACE_REST_SSL : ' true'
2327 DSPACE_REST_HOST : api7.dspace.org
2428 DSPACE_REST_PORT : 443
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ services:
2424 DSPACE_REST_HOST : localhost
2525 DSPACE_REST_PORT : 8080
2626 DSPACE_REST_NAMESPACE : /server
27- # NODE_OPTIONS: --max_old_space_size=6144
2827 image : dspace/dspace-angular:dspace-7_x
2928 build :
3029 context : ..
You can’t perform that action at this time.
0 commit comments