Work in progress.
- Run
npm installto download dependencies - Run
npm startto run in development mode - Default
astro.config.jsincludes Netlify adapter - Alternative
astro.config.node.mjsuses the node adapter instead
Standard deployment via npm run build will build for Netlify.
To build and run as a standalone service, using Node:
- Run
npm install - Run
npm run build-node - Start the service using
node ./dist/server/entry.mjs
Trigger.dev is used as an externally hosted task queue.
In order to use the import/export feature, a Trigger.dev project must be configured.
In .env, set:
TRIGGER_PROJECT_IDfrom your trigger project'sProject settingstabTRIGGER_SECRET_KEYfrom your trigger project'sAPI keystab- and optionally
TRIGGER_SERVER_URLif using self-hosted Trigger.
Once you have set these, you can enqueue tasks to the Development environment in Trigger with hot reloading by running the following command:
npx trigger.dev@latest dev
For a self-hosted instance, or a single instance without multiple tenants, the following environment variables are also required for the Trigger tasks to work (can be added manually to the trigger project after deploy):
SUPABASE_SERVICE_KEY
IIIF_KEY
You can then deploy import/export tasks to the Trigger.dev server by executing the following command at the root of this project repo:
npx trigger.dev@latest deploy -c ./trigger.config.ts
For a multi-tenant setup, the Trigger project only needs to be deployed once and it will be reused for all tenants; and instead of sending the above .env vars to Trigger, you set the following:
MULTI_TENANT=true
OP_SERVICE_ACCOUNT_TOKEN=<1password-service-account-token>
(Currently, only 1Password Service Accounts are supported for managing multi-tenant secrets.)
Then run:
npx trigger.dev@latest deploy -c ./trigger.config.ts
On each individual tenant, ensure the following environment variables are defined (in recogito-client):
OP_VAULT_NAME
OP_ITEM_NAME
And ensure SUPABASE_SERVICE_KEY and IIIF_KEY are both available in that 1password vault/item.
Usage of the NER plugin requires a second Trigger.dev project. For more information on setting it up, see the README for the plugin.
Once complete and deployed, you must set the NER Trigger project's secret key as the TRIGGER_NER_SECRET_KEY environment variable. This will be used by injected plugin routes.