Use this repo to start a local Primo environment.
- Create a directory for the required repos:
mkdir primo && cd primo
- Clone the repos so that they are sibling directories:
- This repo:
git clone https://github.com/UCDavisLibrary/primo-devenv-deploy.git
- The development environment:
git clone https://github.com/UCDavisLibrary/primo-devenv.git
- The UC Davis cusomization package:
git clone https://github.com/UCDavisLibrary/primo-packages.git
- This repo:
- Next, we will build our docker image and compose file:
cd primo-devenv-deploy
./cmds/init-local-dev.sh
./cmds/build.sh
./cmds/generate-deployment-files.sh
Now that the initial set up is done, we can start Primo:
cd primo-local-dev
docker compose up
Primo should now be running at http://localhost:8003/discovery/search?vid=01UCD_INST:UCD
To edit the primary package file, you can edit the primo-packages
repository you cloned during the setup. All changes should display immediately.
When satisfied with your changes, run docker compose exec primo gulp create-package
, which will zip your code and place it in the packages
directory in this repo. See the next section for instructions on uploading your code to production.
^c
will stop the application, and docker compose down
will completely remove the container.
Once you have your zipped package file, you will upload and deploy it to the production Primo instance.
- Login in to Alma
- Select "Discovery" in the left-hand menu. If you don't see it, you will need to be granted the appropriate permissions.
- Click "Configure Views" and then select the 'Edit' for the view.
- Go to 'Manage Customization Packages'
- Download the Current View Customization Package, and stash it somewhere in case something goes awry and you have to roll back
- Upload the new package and save
We use a forked version of the official Primo build process. If you need to edit this process, the gulp files are a volume. To be able to quickly start/stop the environment without restarting the container,
- uncomment the
bash -c "tail -f /dev/null"
command in the docker-compose file docker compose up
docker compose exec primo bash
bash run.sh
to start the process, ctr-c to stop.