Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Installing the Backend (on Docker)

Info

If this is your first time using GitHub CLI (gh), you likely will need to authenticate with it using your GitHub.com login.

Code Block
gh auth login



  1. First, clone the backend codebase using GitHub CLI (gh).  This downloads all the code from GitHub to a https://github.com/DSpace/DSpace into a local directory named "DSpace". 

    Code Block
    # Run from command-line where ever you want the "DSpace" directory of code to be created.
    gh repo clone DSpace/DSpace
    
    # Once downloaded, change into that directory
    cd DSpace


  2. If it is not already running, start Docker Desktop on your machine. It MUST be running for any "docker-compose" or "docker" commands to work.
    1. On Windows, if Docker Desktop is running, you'll see the Docker whale logo in your taskbar's notification area.
  3. Using Docker, pull down the latest backend images from DockerHub. This downloads all the prebuilt Docker images so you don't need to rebuild them locally.

    Code Block
    # This command should be run from the "DSpace" code directory
    docker-compose -f docker-compose.yml -f docker-compose-cli.yml pull


  4. Using Docker, start the Backend on Docker & automatically install our Entities Test Data 

    Code Block
    # First start the backend with the test data
    docker-compose -p d7 -f docker-compose.yml -f dspace/src/main/docker-compose/db.entities.yml up -d
    
    # Run "logs -f" to watch the logs for everything to start up.  Or, just wait a few minutes until http://localhost:8080/server/ responds.
    docker-compose -p d7 -f docker-compose.yml -f dspace/src/main/docker-compose/db.entities.yml logs -f
    # (Click Ctrl+C to exit logs view)
    
    # Finally, download the test data assestore (of files) and install it, reindexing all content
    docker-compose -p d7 -f docker-compose-cli.yml -f dspace/src/main/docker-compose/cli.assetstore.yml run dspace-cli


  5. DONE! At this point, you should be able to go to http://localhost:8080/server/ and see a backend similar to https://api7.dspace.org/server/
    1. You should also see some test data in that backend. For example, clicking on the "collections" endpoint should return some Collections: http://localhost:8080/server/#http://localhost:8080/server/api/core/collections

...

  1. First, clone the frontend codebase using GitHub CLI (gh).  This downloads all the code from GitHub https://github.com/DSpace/dspace-angular to a local directory named "dspace-angular".  You may wish to run this command from the same parent directory where you cloned the backend (just to keep these two folders next to one anotherthis new "dspace-angular" folder next to the "DSpace" folder where the backend code resides). 

    Code Block
    # Run from command-line where ever you want the "dspace-angular" directory of code to be created.
    gh repo clone DSpace/dspace-angular
    
    # Once downloaded, change into that directory
    cd dspace-angular


  2. If it is not already running, start Docker Desktop on your machine. It MUST be running for any "docker-compose" or "docker" commands to work.
    1. On Windows, if Docker Desktop is running, you'll see the Docker whale logo in your taskbar's notification area.
  3. Using Docker, pull down the latest frontend images from DockerHub. This downloads all the prebuilt Docker images so you don't need to rebuild them locally.

    Code Block
    # This command should be run from the "dspace-angular" code directory
    docker-compose -f docker/docker-compose.yml pull


  4. Using Docker, start the frontend/UI: 

    Code Block
    docker-compose -p d7 -f docker/docker-compose.yml up -d
    
    # Optionally run "logs -f" to watch the logs for everything to start up.
    docker-compose -p d7 -f docker/docker-compose.yml logs -f
    # (Click Ctrl+C to exit logs view)


  5. DONE! In a few minutes, the User Interface should be available at http://localhost:4000/   It should automatically be pointed at your Backend (also running on Docker)!
    1. Test it out by logging in using one of the demo accounts!  Login: dspacedemo+admin@gmail.com , Password: dspace

...