I-GUIDE Catalog API
cp .env.template .env
make build
make up
make format
make schema
Files in api/models/schemas
are served at /api/schemas
(i.e. https://localhost/api/schemas/dataset.json)
For discovery to work the mongo db must be configured to use Atlas, search indexes created and a couple of adminstrative settings must be configured. Reach out to sblack@cuahsi.org if you need a db for development work.
- Update the .env file with Atlas credentials
OIDC_ISSUER=https://orcid.org/
DB_USERNAME={username}
DB_PASSWORD={password}
DB_HOST=cluster0.iouzjvv.mongodb.net
DATABASE_NAME=iguide_{user}
DB_PROTOCOL=mongodb+srv
HYDROSHARE_META_READ_URL=https://www.hydroshare.org/hsapi2/resource/%s/json/
HYDROSHARE_FILE_READ_URL=https://www.hydroshare.org/hsapi/resource/%s/files/
TESTING=True
- Login and submit a record to create all the collections
- Run
triggers/management/change_streams_pre_and_post.py
- Create the catalog and typeahead indexes from
atlas/
(TODO detailed instructions)
Triggers have their own docker image (docker/triggers/Dockerfile
). There are two triggers:
triggers/update_catalog.py
listens to the Submission collections and updates the discovery collection accordingly.triggers/update_typeahead.py
listens to the discovery collection and updates the typeahead collection accordingly.
The triggers have not been configured with a resume_token
yet.
A vue application. docker/frontend/Dockerfile
deploys a development version of the vue application and is slow to start up. Deployments should use frontend/Dockerfile
as it is configured to generate the static files and then serve them.