Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# cp .env.example .env
#
# Required: DATABASE_URL, HUB_DATA_DIR, CREDENTIAL_ENCRYPTION_KEY,
# PRINCIPAL_KEY_ENCRYPTION_KEY. Everything else is optional and off when
# unset. The hub reads DB_HOST/DB_PORT/DB_USER/DB_PASSWORD/DB_NAME;
# PRINCIPAL_KEY_ENCRYPTION_KEY, SIDECAR_CREDENTIAL_ENCRYPTION_KEY.
# Everything else is optional and off when unset. The hub reads DB_HOST/DB_PORT/DB_USER/DB_PASSWORD/DB_NAME;
# `bun run dev` derives them from DATABASE_URL.

DATABASE_URL=postgres://localhost:5432/workbench
Expand All @@ -23,6 +23,8 @@ HUB_ALLOW_GIT_INSIDE_WORK_TREE=1
# 32 bytes hex each (openssl rand -hex 32). Generate your own outside a laptop.
CREDENTIAL_ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000
PRINCIPAL_KEY_ENCRYPTION_KEY=1111111111111111111111111111111111111111111111111111111111111111
# Kept separate from the hub's key so a sidecar compromise cannot read the hub's database.
SIDECAR_CREDENTIAL_ENCRYPTION_KEY=2222222222222222222222222222222222222222222222222222222222222222

# Max tool-package tarball the registry accepts. Default 10 MiB.
# HUB_MAX_TARBALL_BYTES=10485760
Expand Down
1 change: 1 addition & 0 deletions scripts/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function validateConfig(): DevConfig {
for (const [name, hex] of [
["CREDENTIAL_ENCRYPTION_KEY", process.env["CREDENTIAL_ENCRYPTION_KEY"]],
["PRINCIPAL_KEY_ENCRYPTION_KEY", process.env["PRINCIPAL_KEY_ENCRYPTION_KEY"]],
["SIDECAR_CREDENTIAL_ENCRYPTION_KEY", process.env["SIDECAR_CREDENTIAL_ENCRYPTION_KEY"]],
] as const) {
if (hex === undefined || hex.trim() === "") {
fail(`${name} is not set. Set it in .env; see .env.example.`);
Expand Down
Loading