refine startup instructions

This commit is contained in:
Terry Brady
2019-10-01 22:52:44 -07:00
parent 292f7ddd25
commit a74f256cea
7 changed files with 97 additions and 34 deletions

View File

@@ -8,17 +8,13 @@ services:
DSPACE_HOST: dspace-angular
DSPACE_NAMESPACE: /
DSPACE_PORT: '3000'
DSPACE_REST_HOST: dspace
DSPACE_REST_NAMESPACE: /
DSPACE_REST_PORT: '8080'
DSPACE_REST_SSL: "false"
DSPACE_SSL: "false"
image: dspace/dspace-angular:latest
build:
context: .
dockerfile: Dockerfile
networks:
dspacenet: {}
dspacenet:
ports:
- published: 3000
target: 3000

View File

@@ -30,23 +30,37 @@ docker-compose build
```
## To start DSpace (REST and Angular) from your branch
```
docker-compose -p d7 -f docker-compose.yml -f docker/docker-compose-rest.yml up -d
docker-compose -p d7 -f docker/docker-compose-rest.yml -f docker-compose.yml up -d
```
## To build DSpace REST and DSpace Angular.
## Run DSpace REST and DSpace Angular from local branches.
_The system will be started in 2 steps. Each step shares the same docker network._
From DSpace/DSpace
From DSpace/DSpace (build as needed)
```
docker-compose -p d7 up --build -d
docker-compose -p d7 up -d
```
From DSpace/DSpace-angular
```
docker-compose -p d7 up --build -d
docker-compose -p d7 up -d
```
## Ingest test data from AIPDIR
Create an administrator
```
docker-compose -p d7 -f docker/cli.yml run --rm dspace-cli create-administrator -e test@test.edu -f admin -l user -p admin -c en
```
Load content from AIP files
```
docker-compose -p d7 -f docker/cli.yml -f ./docker/cli.ingest.yml run --rm dspace-cli
```
## End to end testing of the rest api (runs in travis).
_In this instance, only the REST api runs in Docker. Travis will perform CI testing of Angular using Node to drive the tests._

View File

@@ -21,5 +21,3 @@ services:
fi
/dspace/bin/dspace index-discovery
/dspace/bin/dspace oai import
/dspace/bin/dspace oai clean-cache

32
docker/cli.ingest.yml Normal file
View File

@@ -0,0 +1,32 @@
#
# 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/
#
version: "3.7"
services:
dspace-cli:
environment:
- AIPZIP=https://github.com/DSpace-Labs/AIP-Files/raw/master/dogAndReport.zip
- ADMIN_EMAIL=test@test.edu
- AIPDIR=/tmp/aip-dir
entrypoint:
- /bin/bash
- '-c'
- |
rm -rf $${AIPDIR}
mkdir $${AIPDIR} /dspace/upload
cd $${AIPDIR}
pwd
curl $${AIPZIP} -L -s --output aip.zip
unzip aip.zip
cd $${AIPDIR}
/dspace/bin/dspace packager -r -a -t AIP -e $${ADMIN_EMAIL} -f -u SITE*.zip
/dspace/bin/dspace database update-sequences
/dspace/bin/dspace index-discovery

16
docker/db.entities.yml Normal file
View File

@@ -0,0 +1,16 @@
#
# 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/
#
version: "3.7"
services:
dspacedb:
image: dspace/dspace-postgres-pgcrypto:loadsql
environment:
# Double underbars in env names will be replaced with periods for apache commons
- LOADSQL=https://www.dropbox.com/s/xh3ack0vg0922p2/configurable-entities-2019-05-08.sql?dl=1

View File

@@ -1,5 +1,5 @@
networks:
dspacenet: {}
dspacenet:
services:
dspace:
container_name: dspace
@@ -7,7 +7,7 @@ services:
- dspacedb
image: dspace/dspace:dspace-7_x-jdk8-test
networks:
dspacenet: {}
dspacenet:
ports:
- published: 8080
target: 8080
@@ -15,12 +15,19 @@ services:
tty: true
volumes:
- assetstore:/dspace/assetstore
- ./local.cfg:/dspace/config/local.cfg
- "./local.cfg:/dspace/config/local.cfg"
# Ensure that the database is ready before starting tomcat
entrypoint:
- /bin/bash
- '-c'
- |
/dspace/bin/dspace database migrate
catalina.sh run
dspacedb:
container_name: dspacedb
image: dspace/dspace-postgres-pgcrypto
networks:
dspacenet: {}
dspacenet:
stdin_open: true
tty: true
volumes:
@@ -29,7 +36,7 @@ services:
container_name: dspacesolr
image: dspace/dspace-solr
networks:
dspacenet: {}
dspacenet:
ports:
- published: 8983
target: 8983
@@ -42,9 +49,9 @@ services:
- solr_statistics:/opt/solr/server/solr/statistics/data
version: '3.7'
volumes:
assetstore: {}
pgdata: {}
solr_authority: {}
solr_oai: {}
solr_search: {}
solr_statistics: {}
assetstore:
pgdata:
solr_authority:
solr_oai:
solr_search:
solr_statistics:

View File

@@ -1,5 +1,5 @@
networks:
dspacenet: {}
dspacenet:
services:
dspace:
container_name: dspace
@@ -7,7 +7,7 @@ services:
- dspacedb
image: dspace/dspace:dspace-7_x-jdk8-test
networks:
dspacenet: {}
dspacenet:
ports:
- published: 8080
target: 8080
@@ -15,7 +15,7 @@ services:
tty: true
volumes:
- assetstore:/dspace/assetstore
- ./local.cfg:/dspace/config/local.cfg
- "./local.cfg:/dspace/config/local.cfg"
dspacedb:
container_name: dspacedb
environment:
@@ -23,7 +23,7 @@ services:
PGDATA: /pgdata
image: dspace/dspace-postgres-pgcrypto:loadsql
networks:
dspacenet: {}
dspacenet:
stdin_open: true
tty: true
volumes:
@@ -32,7 +32,7 @@ services:
container_name: dspacesolr
image: dspace/dspace-solr
networks:
dspacenet: {}
dspacenet:
ports:
- published: 8983
target: 8983
@@ -45,9 +45,9 @@ services:
- solr_statistics:/opt/solr/server/solr/statistics/data
version: '3.7'
volumes:
assetstore: {}
pgdata: {}
solr_authority: {}
solr_oai: {}
solr_search: {}
solr_statistics: {}
assetstore:
pgdata:
solr_authority:
solr_oai:
solr_search:
solr_statistics: