forked from hazza/dspace-angular
Dockerfile, angular.json and docker compose that works for webpack-dev + reverse proxy
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -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
|
# 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
|
# if you have a public URL. See https://github.com/DSpace/dspace-angular/issues/1485
|
||||||
ENV NODE_ENV=development
|
ENV NODE_ENV=development
|
||||||
RUN npm run serve -- --host 0.0.0.0
|
CMD npm run serve -- --host 0.0.0.0 --disable-host-check
|
||||||
|
|
||||||
|
|
||||||
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;"]
|
|
||||||
|
@@ -112,7 +112,9 @@
|
|||||||
"builder": "@angular-builders/custom-webpack:dev-server",
|
"builder": "@angular-builders/custom-webpack:dev-server",
|
||||||
"options": {
|
"options": {
|
||||||
"buildTarget": "dspace-angular:build",
|
"buildTarget": "dspace-angular:build",
|
||||||
"port": 4000
|
"port": 4000,
|
||||||
|
"allowedHosts": ["all"],
|
||||||
|
"disableHostCheck": true,
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"development": {
|
"development": {
|
||||||
|
@@ -29,8 +29,8 @@ services:
|
|||||||
# dspace.dir, dspace.server.url, dspace.ui.url and dspace.name
|
# dspace.dir, dspace.server.url, dspace.ui.url and dspace.name
|
||||||
dspace__P__dir: /dspace
|
dspace__P__dir: /dspace
|
||||||
# Uncomment to set a non-default value for dspace.server.url or dspace.ui.url
|
# 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__server__P__url: https://digitalrepo.internal.yel.or.id/server
|
||||||
# dspace__P__ui__P__url: http://localhost:4000
|
dspace__P__ui__P__url: https://digitalrepo.internal.yel.or.id
|
||||||
dspace__P__name: 'DSpace Started with Docker Compose'
|
dspace__P__name: 'DSpace Started with Docker Compose'
|
||||||
# db.url: Ensure we are using the 'dspacedb' image for our database
|
# db.url: Ensure we are using the 'dspacedb' image for our database
|
||||||
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
|
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
|
||||||
|
@@ -19,9 +19,9 @@ services:
|
|||||||
DSPACE_UI_HOST: dspace-angular
|
DSPACE_UI_HOST: dspace-angular
|
||||||
DSPACE_UI_PORT: '4000'
|
DSPACE_UI_PORT: '4000'
|
||||||
DSPACE_UI_NAMESPACE: /
|
DSPACE_UI_NAMESPACE: /
|
||||||
DSPACE_REST_SSL: 'false'
|
DSPACE_REST_SSL: 'true'
|
||||||
DSPACE_REST_HOST: localhost
|
DSPACE_REST_HOST: digitalrepo.internal.yel.or.id
|
||||||
DSPACE_REST_PORT: 8080
|
DSPACE_REST_PORT: '443'
|
||||||
DSPACE_REST_NAMESPACE: /server
|
DSPACE_REST_NAMESPACE: /server
|
||||||
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-angular:${DSPACE_VER:-latest}"
|
image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_OWNER:-dspace}/dspace-angular:${DSPACE_VER:-latest}"
|
||||||
build:
|
build:
|
||||||
@@ -36,12 +36,3 @@ services:
|
|||||||
target: 9876
|
target: 9876
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: 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
|
|
Reference in New Issue
Block a user