- /api (Newznab: caps, search, tvsearch, movie, music, book, get) for Prowlarr, Sonarr and Radarr: voyager 1's controller and XML on the new catalog; readable releases not known to miss files; NEWZNAB_API_KEY. - /api/v1/releases (q, cat, readable, complete, source, poster, size, sort, paging), /api/v1/releases/:id with its files (decoded from the chunks; NzbService.files, shared with the NZB), /api/v1/stats (estimates, plus history and tail progress), /health. Open, as voyager 1's catalog; the web interface uses it. - release_category(name): voyager 1's categorizer without the archive contents, a generated column with a (category, posted_at) index. - @adonisjs/static for the web interface (next). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
63 lines
2.2 KiB
TypeScript
63 lines
2.2 KiB
TypeScript
/*
|
|
|--------------------------------------------------------------------------
|
|
| Environment variables service
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The `Env.create` method creates an instance of the Env service. The
|
|
| service validates the environment variables and also cast values
|
|
| to JavaScript data types.
|
|
|
|
|
*/
|
|
|
|
import { Env } from '@adonisjs/core/env'
|
|
|
|
export default await Env.create(new URL('../', import.meta.url), {
|
|
// Node
|
|
NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const),
|
|
PORT: Env.schema.number(),
|
|
HOST: Env.schema.string({ format: 'host' }),
|
|
LOG_LEVEL: Env.schema.string(),
|
|
|
|
// App
|
|
APP_KEY: Env.schema.secret(),
|
|
APP_URL: Env.schema.string({ format: 'url', tld: false }),
|
|
|
|
// Session
|
|
SESSION_DRIVER: Env.schema.enum(['cookie', 'memory', 'database'] as const),
|
|
|
|
// Database
|
|
DB_HOST: Env.schema.string({ format: 'host' }),
|
|
DB_PORT: Env.schema.number(),
|
|
DB_USER: Env.schema.string(),
|
|
DB_PASSWORD: Env.schema.string.optional(),
|
|
DB_DATABASE: Env.schema.string(),
|
|
DB_POOL_MAX: Env.schema.number.optional(),
|
|
// Tablespace for the chunk store (the HDD on homelab).
|
|
CHUNK_TABLESPACE: Env.schema.string.optional(),
|
|
DB_DEBUG: Env.schema.boolean.optional(),
|
|
|
|
// NNTP (the coordinator's relay; edge:bench --capture)
|
|
NNTP_HOST: Env.schema.string.optional(),
|
|
NNTP_PORT: Env.schema.number.optional(),
|
|
NNTP_USER: Env.schema.string.optional(),
|
|
NNTP_PASSWORD: Env.schema.string.optional(),
|
|
NNTP_SECURE: Env.schema.boolean.optional(),
|
|
NNTP_CONNECTIONS: Env.schema.number.optional(),
|
|
NNTP_TIMEOUT_MS: Env.schema.number.optional(),
|
|
|
|
// Newznab API key (empty: no key needed)
|
|
NEWZNAB_API_KEY: Env.schema.secret.optional(),
|
|
|
|
// Coordinator
|
|
RANGE_ARTICLES: Env.schema.number.optional(),
|
|
TAIL_EVERY_SECONDS: Env.schema.number.optional(),
|
|
TAIL_MIN_ARTICLES: Env.schema.number.optional(),
|
|
TAIL_MAX_DELAY_MINUTES: Env.schema.number.optional(),
|
|
CHUNK_ARTICLES: Env.schema.number.optional(),
|
|
LEASE_TTL_SECONDS: Env.schema.number.optional(),
|
|
SPOOL_DIR: Env.schema.string.optional(),
|
|
SPOOL_AHEAD_PER_LEASE: Env.schema.number.optional(),
|
|
SPOOL_MIN_AHEAD: Env.schema.number.optional(),
|
|
SPOOL_MAX_GB: Env.schema.number.optional(),
|
|
})
|