Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Configure a deployment

Backend settings

The server reads raven.toml (or a path set via RAVEN_CONFIG). Environment variables override TOML values when set.

KeyDefaultDescription
DATABASE_URI—MySQL connection string (required)
MIGRATION_DATABASE_URI—Connection string for migrations (optional)
BASE_URL_WEB—Frontend origin (used in emails, CORS)
BASE_URL_ADMIN—Admin UI origin
BASE_URL_API—API origin
SERVER_HOST0.0.0.0Bind address
SERVER_PORT7001Listen port
JWT_SECRET_KEY—JWT signing secret (required)
BETTER_AUTH_SECRET—BetterAuth secret (required)
AWS_*—S3 credentials, bucket, and endpoint (set AWS_S3_ENDPOINT/AWS_S3_PUBLIC_ENDPOINT for a local (dev) S3-compatible service like MinIO)
MAILGUN_API_KEY—Outbound email
DATACITE_*—DOI registration credentials
DATACITE_PREFIX—DOI prefix for all minted DOIs. DOIs are only minted for organizations with DOI minting enabled.
DATACITE_PUBLISHERThe StacksPublisher name in DOI metadata. When it’s The Stacks, Astera Institute is also added as the hosting institution, so change it for other deployments.
ORCID_*—ORCID OAuth
GOOGLE_*—Google OAuth
Astera Specific Below--
LINEAR_*-Our contact-us form uses the data to crerate a linear task, which requires these keys

Set up DataCite

To mint DOIs, set the DATACITE_* settings above. Then an admin turns on DOI minting for each organization that needs it.

First run

The backend image runs database migrations on startup if MIGRATION_DATABASE_URI is set.

To create the first site admin, run node dist/scripts/seed-admin.js in the backend container with ADMIN_USERNAME and ADMIN_PASSWORD set. The local deployment does this on startup.

Admin UI

To deploy to production, you can use the provided Dockerfile. Additionally, you will need to configure routing in your environments so that requests to https://[admin-ui-domain]/api get routed to the appropriate backend.

See the documentation for your infrastructure on how to do this. Alternatively, you can deploy the app with docker-compose and use an nginx-proxy, similar to how the local docker-based deployment works.

Log in as the first admin