The DSpace User Interface built on Angular, written in TypeScript and using Angular Universal.
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
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.
- The
.gitignoreof this repo has.envadded to it, so we use.env.localas our primary .env file. - S3 support has been explicitly disabled in
docker/local.cfg. - The handle server has been configured in
docker/local.cfgwith our handle prefix:handle.additional.prefixes = 20.500.12115.
The v5 to v7 migration uses code from a separate repo. High-level process:
- Clone migration tool and install dependencies
- Start fresh v7 DSpace instance
- Load v5 database dumps into Postgres container
- Transfer v5 assetstore files (required for complete migration)
- Configure migration tool (
project_settings.py) - 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
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 FalseVerification: 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.
# 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># Pull in new upstream changes from UFAL (to rebase on)
git fetch upstreamThis 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/amd64in your.env.local.