Thanks to visit codestin.com
Credit goes to github.com

Skip to content

kuhumcst/dspace-angular

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

dspace-angular

The DSpace User Interface built on Angular, written in TypeScript and using Angular Universal.

Overview

This is a fork of https://github.com/DSpace/dspace-angular modified to function as a frontend for clarin-dspace. Please refer to Installation Wiki or the clarin-dspace v7 wiki

CLARIN-DK setup

NOTE: this is the appended setup guide for CLARIN-DK's DSpace repository.

  • The new main repo of the CLARIN DSpace is now the frontend repo (dspace-angular), not the backend one (clarin-dspace).
  • The branch which contains our downstream changes is called clarin-dk-v7.
    • Consider this the de facto master/main branch.
    • It contains just enough changes to make running a CLARIN-DK DSpace Docker setup possible in our dev/prod environments.
    • It needs to be regularly rebased on the stable branch of the CLARIN DSpace v7 fork (the one maintained by ufal).
      • When rebasing, expect occasional merge conflicts for this README.md (as well as other files touched in the meantime).
  • The previous CLARIN DSpace repo had a branch which contained downstream changes called clarin-dk-ucph, though that was for the older v5 of DSpace.

Deviations from upstream

  • The .gitignore of this repo has .env added to it, so we use .env.local as our primary .env file.
  • S3 support has been explicitly disabled in docker/local.cfg.
  • The handle server has been configured in docker/local.cfg with our handle prefix: handle.additional.prefixes = 20.500.12115.

Migrations

The v5 to v7 migration uses code from a separate repo. High-level process:

  1. Clone migration tool and install dependencies
  2. Start fresh v7 DSpace instance
  3. Load v5 database dumps into Postgres container
  4. Transfer v5 assetstore files (required for complete migration)
  5. Configure migration tool (project_settings.py)
  6. Run migration via REST API

Important: Migration must be performed with full assetstore access. Post-migration file addition doesn't work.

For detailed step-by-step instructions, see https://github.com/kuhumcst/dspace-v7-data

Troubleshooting: Handle Conflicts

Symptoms: POST [core/communities] failed. Exception: [<Response [500]>], backend logs show "handle already in use", 0 items imported.

Cause: Migration tool uses cache in src/__temp/resume/. After docker compose down -v, cached UUIDs are stale.

Solution:

# Reset everything
cd /path/to/dspace-angular
docker compose --env-file .env.local -p dspace-test -f docker/docker-compose.yml -f docker/docker-compose-rest.yml down -v
docker compose --env-file .env.local -p dspace-test -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d --pull always
docker logs -f dspace0  # Wait for startup

# Recreate admin
docker compose --env-file .env.local -p dspace-test -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f docker/cli.yml run --rm dspace-cli create-administrator -e [email protected] -f Test -l Admin -p password -c en -o Test

# Reload v5 databases
docker exec dspacedb0 createdb -U dspace -p 5430 clarin-dspace
docker exec dspacedb0 createdb -U dspace -p 5430 clarin-utilities
cat /path/to/clarin-dspace.sql | docker exec -i dspacedb0 psql -U dspace -p 5430 clarin-dspace
cat /path/to/clarin-utilities.sql | docker exec -i dspacedb0 psql -U dspace -p 5430 clarin-utilities

# Delete cache and re-run
cd /path/to/dspace-migrate
rm -rf src/__temp/resume/
source .venv/bin/activate
cd src
python repo_import.py --resume False

Verification: Should see OK Imported [ 1] communities, OK Imported [ 2] collections in logs.

Best practice: Always clean cache (rm -rf src/__temp/resume/) and use --resume False when restarting from scratch.

Commands

Docker

# Start CLARIN-DSpace v7 locally
#   --env-file .env.local    Use our local environment config
#   -p dspace-test           Project name (prefixes container names)
#   -f docker/docker-...     Compose files for frontend and backend
#   -d                       Run in background (detached)
#   --pull always            Always fetch latest images before starting
docker compose --env-file .env.local -p dspace-test -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d --pull always

# Restart (e.g. after config changes)
docker compose --env-file .env.local -p dspace-test -f docker/docker-compose.yml -f docker/docker-compose-rest.yml down
docker compose --env-file .env.local -p dspace-test -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d

# Full reset (wipes all data)
docker compose --env-file .env.local -p dspace-test -f docker/docker-compose.yml -f docker/docker-compose-rest.yml down -v
docker compose --env-file .env.local -p dspace-test -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d --pull always

# View backend logs
docker logs -f dspace0

# Run DSpace CLI commands
docker compose --env-file .env.local -p dspace-test -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f docker/cli.yml run --rm dspace-cli <command>

Git

# Pull in new upstream changes from UFAL (to rebase on)
git fetch upstream

Resource use

This version of CLARIN DSpace is more resource hungry. Recommended setup:

  • CPUs: 4 cores minimum, 6+ if you can spare them (the Angular build is parallelized)
  • Memory: 6-8GB
  • Swap: 1-2GB

NOTE: for Apple Silicon Macs, Rosetta emulation needs to be enabled as the CLARIN DSpace Docker images are built for x86. Set DOCKER_DEFAULT_PLATFORM=linux/amd64 in your .env.local.

About

DSpace 7.x (and above) User Interface built on Angular.io

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 79.6%
  • HTML 17.8%
  • SCSS 2.1%
  • CSS 0.3%
  • JavaScript 0.2%
  • Shell 0.0%