mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Update docker-compose for runtime configs. Remove all config files & replace with env variables
This commit is contained in:
@@ -359,7 +359,7 @@ dspace-angular
|
|||||||
│ ├── plugins * Folder for Cypress plugins (if any)
|
│ ├── plugins * Folder for Cypress plugins (if any)
|
||||||
│ ├── support * Folder for global e2e test actions/commands (run for all tests)
|
│ ├── support * Folder for global e2e test actions/commands (run for all tests)
|
||||||
│ └── tsconfig.json * TypeScript configuration file for e2e tests
|
│ └── tsconfig.json * TypeScript configuration file for e2e tests
|
||||||
├── docker *
|
├── docker * See docker/README.md for details
|
||||||
│ ├── cli.assetstore.yml *
|
│ ├── cli.assetstore.yml *
|
||||||
│ ├── cli.ingest.yml *
|
│ ├── cli.ingest.yml *
|
||||||
│ ├── cli.yml *
|
│ ├── cli.yml *
|
||||||
@@ -367,8 +367,6 @@ dspace-angular
|
|||||||
│ ├── docker-compose-ci.yml *
|
│ ├── docker-compose-ci.yml *
|
||||||
│ ├── docker-compose-rest.yml *
|
│ ├── docker-compose-rest.yml *
|
||||||
│ ├── docker-compose.yml *
|
│ ├── docker-compose.yml *
|
||||||
│ ├── environment.dev.ts *
|
|
||||||
│ ├── local.cfg *
|
|
||||||
│ └── README.md *
|
│ └── README.md *
|
||||||
├── docs * Folder for documentation
|
├── docs * Folder for documentation
|
||||||
│ └── Configuration.md * Configuration documentation
|
│ └── Configuration.md * Configuration documentation
|
||||||
|
@@ -29,10 +29,6 @@ docker push dspace/dspace-angular:dspace-7_x
|
|||||||
- Docker compose file that provides a DSpace CLI container to work with a running DSpace REST container.
|
- Docker compose file that provides a DSpace CLI container to work with a running DSpace REST container.
|
||||||
- cli.assetstore.yml
|
- cli.assetstore.yml
|
||||||
- Docker compose file that will download and install data into a DSpace REST assetstore. This script points to a default dataset that will be utilized for CI testing.
|
- Docker compose file that will download and install data into a DSpace REST assetstore. This script points to a default dataset that will be utilized for CI testing.
|
||||||
- environment.dev.ts
|
|
||||||
- Environment file for running DSpace Angular in Docker
|
|
||||||
- local.cfg
|
|
||||||
- Environment file for running the DSpace 7 REST API in Docker.
|
|
||||||
|
|
||||||
|
|
||||||
## To refresh / pull DSpace images from Dockerhub
|
## To refresh / pull DSpace images from Dockerhub
|
||||||
|
@@ -18,10 +18,19 @@ services:
|
|||||||
dspace-cli:
|
dspace-cli:
|
||||||
image: "${DOCKER_OWNER:-dspace}/dspace-cli:${DSPACE_VER:-dspace-7_x}"
|
image: "${DOCKER_OWNER:-dspace}/dspace-cli:${DSPACE_VER:-dspace-7_x}"
|
||||||
container_name: dspace-cli
|
container_name: dspace-cli
|
||||||
#environment:
|
environment:
|
||||||
|
# Below syntax may look odd, but it is how to override dspace.cfg settings via env variables.
|
||||||
|
# See https://github.com/DSpace/DSpace/blob/main/dspace/config/config-definition.xml
|
||||||
|
# __P__ => "." (e.g. dspace__P__dir => dspace.dir)
|
||||||
|
# __D__ => "-" (e.g. google__D__metadata => google-metadata)
|
||||||
|
# dspace.dir
|
||||||
|
dspace__P__dir: /dspace
|
||||||
|
# db.url: Ensure we are using the 'dspacedb' image for our database
|
||||||
|
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
|
||||||
|
# solr.server: Ensure we are using the 'dspacesolr' image for Solr
|
||||||
|
solr__P__server: http://dspacesolr:8983/solr
|
||||||
volumes:
|
volumes:
|
||||||
- "assetstore:/dspace/assetstore"
|
- "assetstore:/dspace/assetstore"
|
||||||
- "./local.cfg:/dspace/config/local.cfg"
|
|
||||||
entrypoint: /dspace/bin/dspace
|
entrypoint: /dspace/bin/dspace
|
||||||
command: help
|
command: help
|
||||||
networks:
|
networks:
|
||||||
|
@@ -17,6 +17,19 @@ services:
|
|||||||
# DSpace (backend) webapp container
|
# DSpace (backend) webapp container
|
||||||
dspace:
|
dspace:
|
||||||
container_name: dspace
|
container_name: dspace
|
||||||
|
environment:
|
||||||
|
# Below syntax may look odd, but it is how to override dspace.cfg settings via env variables.
|
||||||
|
# See https://github.com/DSpace/DSpace/blob/main/dspace/config/config-definition.xml
|
||||||
|
# __P__ => "." (e.g. dspace__P__dir => dspace.dir)
|
||||||
|
# __D__ => "-" (e.g. google__D__metadata => google-metadata)
|
||||||
|
# dspace.dir, dspace.server.url and dspace.ui.url
|
||||||
|
dspace__P__dir: /dspace
|
||||||
|
dspace__P__server__P__url: http://localhost:8080/server
|
||||||
|
dspace__P__ui__P__url: http://localhost:4000
|
||||||
|
# db.url: Ensure we are using the 'dspacedb' image for our database
|
||||||
|
db__P__url: 'jdbc:postgresql://dspacedb:5432/dspace'
|
||||||
|
# solr.server: Ensure we are using the 'dspacesolr' image for Solr
|
||||||
|
solr__P__server: http://dspacesolr:8983/solr
|
||||||
depends_on:
|
depends_on:
|
||||||
- dspacedb
|
- dspacedb
|
||||||
image: dspace/dspace:dspace-7_x-test
|
image: dspace/dspace:dspace-7_x-test
|
||||||
@@ -29,7 +42,6 @@ services:
|
|||||||
tty: true
|
tty: true
|
||||||
volumes:
|
volumes:
|
||||||
- assetstore:/dspace/assetstore
|
- assetstore:/dspace/assetstore
|
||||||
- "./local.cfg:/dspace/config/local.cfg"
|
|
||||||
# Mount DSpace's solr configs to a volume, so that we can share to 'dspacesolr' container (see below)
|
# Mount DSpace's solr configs to a volume, so that we can share to 'dspacesolr' container (see below)
|
||||||
- solr_configs:/dspace/solr
|
- solr_configs:/dspace/solr
|
||||||
# Ensure that the database is ready BEFORE starting tomcat
|
# Ensure that the database is ready BEFORE starting tomcat
|
||||||
|
@@ -13,10 +13,32 @@
|
|||||||
version: '3.7'
|
version: '3.7'
|
||||||
networks:
|
networks:
|
||||||
dspacenet:
|
dspacenet:
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
# Define a custom subnet for our DSpace network, so that we can easily trust requests from host to container.
|
||||||
|
# If you customize this value, be sure to customize the 'proxies.trusted.ipranges' env variable below.
|
||||||
|
- subnet: 172.23.0.0/16
|
||||||
services:
|
services:
|
||||||
# DSpace (backend) webapp container
|
# DSpace (backend) webapp container
|
||||||
dspace:
|
dspace:
|
||||||
container_name: dspace
|
container_name: dspace
|
||||||
|
environment:
|
||||||
|
# Below syntax may look odd, but it is how to override dspace.cfg settings via env variables.
|
||||||
|
# See https://github.com/DSpace/DSpace/blob/main/dspace/config/config-definition.xml
|
||||||
|
# __P__ => "." (e.g. dspace__P__dir => dspace.dir)
|
||||||
|
# __D__ => "-" (e.g. google__D__metadata => google-metadata)
|
||||||
|
# dspace.dir, dspace.server.url, dspace.ui.url and dspace.name
|
||||||
|
dspace__P__dir: /dspace
|
||||||
|
dspace__P__server__P__url: http://localhost:8080/server
|
||||||
|
dspace__P__ui__P__url: http://localhost:4000
|
||||||
|
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'
|
||||||
|
# solr.server: Ensure we are using the 'dspacesolr' image for Solr
|
||||||
|
solr__P__server: http://dspacesolr:8983/solr
|
||||||
|
# proxies.trusted.ipranges: This setting is required for a REST API running in Docker to trust requests
|
||||||
|
# from the host machine. This IP range MUST correspond to the 'dspacenet' subnet defined above.
|
||||||
|
proxies__P__trusted__P__ipranges: '172.23.0'
|
||||||
image: dspace/dspace:dspace-7_x-test
|
image: dspace/dspace:dspace-7_x-test
|
||||||
depends_on:
|
depends_on:
|
||||||
- dspacedb
|
- dspacedb
|
||||||
@@ -29,7 +51,6 @@ services:
|
|||||||
tty: true
|
tty: true
|
||||||
volumes:
|
volumes:
|
||||||
- assetstore:/dspace/assetstore
|
- assetstore:/dspace/assetstore
|
||||||
- "./local.cfg:/dspace/config/local.cfg"
|
|
||||||
# Mount DSpace's solr configs to a volume, so that we can share to 'dspacesolr' container (see below)
|
# Mount DSpace's solr configs to a volume, so that we can share to 'dspacesolr' container (see below)
|
||||||
- solr_configs:/dspace/solr
|
- solr_configs:/dspace/solr
|
||||||
# Ensure that the database is ready BEFORE starting tomcat
|
# Ensure that the database is ready BEFORE starting tomcat
|
||||||
|
@@ -16,10 +16,14 @@ services:
|
|||||||
dspace-angular:
|
dspace-angular:
|
||||||
container_name: dspace-angular
|
container_name: dspace-angular
|
||||||
environment:
|
environment:
|
||||||
DSPACE_HOST: dspace-angular
|
DSPACE_UI_SSL: false
|
||||||
DSPACE_NAMESPACE: /
|
DSPACE_UI_HOST: dspace-angular
|
||||||
DSPACE_PORT: '4000'
|
DSPACE_UI_PORT: '4000'
|
||||||
DSPACE_SSL: "false"
|
DSPACE_UI_NAMESPACE: /
|
||||||
|
DSPACE_REST_SSL: false
|
||||||
|
DSPACE_REST_HOST: localhost
|
||||||
|
DSPACE_REST_PORT: 8080
|
||||||
|
DSPACE_REST_NAMESPACE: /server
|
||||||
image: dspace/dspace-angular:dspace-7_x
|
image: dspace/dspace-angular:dspace-7_x
|
||||||
build:
|
build:
|
||||||
context: ..
|
context: ..
|
||||||
@@ -33,5 +37,3 @@ services:
|
|||||||
target: 9876
|
target: 9876
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
volumes:
|
|
||||||
- ./environment.dev.ts:/app/src/environments/environment.dev.ts
|
|
||||||
|
@@ -1,18 +0,0 @@
|
|||||||
/**
|
|
||||||
* The contents of this file are subject to the license and copyright
|
|
||||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
|
||||||
* tree and available online at
|
|
||||||
*
|
|
||||||
* http://www.dspace.org/license/
|
|
||||||
*/
|
|
||||||
// This file is based on environment.template.ts provided by Angular UI
|
|
||||||
export const environment = {
|
|
||||||
// Default to using the local REST API (running in Docker)
|
|
||||||
rest: {
|
|
||||||
ssl: false,
|
|
||||||
host: 'localhost',
|
|
||||||
port: 8080,
|
|
||||||
// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
|
|
||||||
nameSpace: '/server'
|
|
||||||
}
|
|
||||||
};
|
|
@@ -1,6 +0,0 @@
|
|||||||
dspace.dir=/dspace
|
|
||||||
db.url=jdbc:postgresql://dspacedb:5432/dspace
|
|
||||||
dspace.server.url=http://localhost:8080/server
|
|
||||||
dspace.ui.url=http://localhost:4000
|
|
||||||
dspace.name=DSpace Started with Docker Compose
|
|
||||||
solr.server=http://dspacesolr:8983/solr
|
|
Reference in New Issue
Block a user