Skip to content

Latest commit

 

History

History
85 lines (59 loc) · 2.5 KB

File metadata and controls

85 lines (59 loc) · 2.5 KB

@schemavaults/auth-server

Authentication backend for SchemaVaults applications. Deployed in production as auth.schemavaults.com.

Interacting with @schemavaults/auth-server

See the @schemavaults/auth-client-sdk and @schemavaults/auth-react-provider packages for authenticating against this authentication server.

Dependencies

Development

First-Time Setup

1. Install Dependencies

You will need some staples:

Install the necessary dependencies for all packages and the auth server by running:

bun install

2. Configure Environment Variables

There is a helper script init-dev-env.ts that will generate the .env.development file for you, prompting you for environment variables. Run it from the monorepo root:

bun run dev:init-env

3. Configure Database

You'll need to launch the database and run migrations in order for the server to properly read/write data:

# From the monorepo root:
# Launch the database
bun run dev:db
# In a separate terminal, run migrations while the database is running
bun run dev:migrate

Launch dev services

1. Launch development database

# From the monorepo root:
# Launch the database
bun run dev:db

2. Launch development auth server

# From the monorepo root:
# Launch the auth server
bun run dev:server

3. Connect to local development auth server

By default the development auth server will run at http://localhost:6767.

Production / Build

Production

https://auth.schemavaults.com

Build as a standalone Docker container (for E2E testing offline)

# From the monorepo root
docker build \
    -t schemavaults/auth-server:latest \
    -f ./auth-server/Dockerfile \
    .