1
0

Dockerfile, angular.json and docker compose that works for webpack-dev + reverse proxy

This commit is contained in:
2025-07-22 21:07:11 +07:00
parent 60956a023b
commit f765150bc9
4 changed files with 9 additions and 24 deletions

View File

@@ -23,12 +23,4 @@ ENV NODE_OPTIONS="--max_old_space_size=4096"
# NOTE: At this time it is only possible to run Docker container in Production mode
# if you have a public URL. See https://github.com/DSpace/dspace-angular/issues/1485
ENV NODE_ENV=development
RUN npm run serve -- --host 0.0.0.0
FROM nginx:stable-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
# COPY --from=builder /app/dist/dspace-angular /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
CMD npm run serve -- --host 0.0.0.0 --disable-host-check

View File

@@ -112,7 +112,9 @@
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"buildTarget": "dspace-angular:build",
"port": 4000
"port": 4000,
"allowedHosts": ["all"],
"disableHostCheck": true,
},
"configurations": {
"development": {

View File

@@ -29,8 +29,8 @@ services:
# dspace.dir, dspace.server.url, dspace.ui.url and dspace.name
dspace__P__dir: /dspace
# Uncomment to set a non-default value for dspace.server.url or dspace.ui.url
# dspace__P__server__P__url: http://localhost:8080/server
# dspace__P__ui__P__url: http://localhost:4000
dspace__P__server__P__url: https://digitalrepo.internal.yel.or.id/server
dspace__P__ui__P__url: https://digitalrepo.internal.yel.or.id
dspace__P__name: 'DSpace Started with Docker Compose'
# db.url: Ensure we are using the 'dspacedb' image for our database
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'

View File

@@ -19,9 +19,9 @@ services:
DSPACE_UI_HOST: dspace-angular
DSPACE_UI_PORT: '4000'
DSPACE_UI_NAMESPACE: /
DSPACE_REST_SSL: 'false'
DSPACE_REST_HOST: localhost
DSPACE_REST_PORT: 8080
DSPACE_REST_SSL: 'true'
DSPACE_REST_HOST: digitalrepo.internal.yel.or.id
DSPACE_REST_PORT: '443'
DSPACE_REST_NAMESPACE: /server
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-angular:${DSPACE_VER:-latest}"
build:
@@ -36,12 +36,3 @@ services:
target: 9876
stdin_open: true
tty: true
proxy:
container_name: dspace-nginx-proxy
image: nginx:stable-alpine
volumes:
- ../nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "80:80" # Expose Nginx port for external access
depends_on:
- dspace-angular