Files
adam-acs/start/env.ts
T
Kevin L'HereecandCopilot d1c65dbf1e chore: initial commit — AdonisJS v7 TR-069 ACS
- Docker infrastructure (Dockerfile, docker-compose.yml, genieacs-sim)
- AdonisJS v7 app with Inertia.js + Vue 3
- MongoDB integration
- CWMP/TR-069 state machine engine
- Configuration engine with compliance tracking
- Branding: ADAM ACS (favicon, navbar, locales)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 16:46:37 +02:00

46 lines
1.4 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'] as const),
// MongoDB
MONGODB_URI: Env.schema.string(),
MONGODB_DB_NAME: Env.schema.string.optional(),
// Observability
OTEL_EXPORTER_URI: Env.schema.string.optional(),
OTEL_SAMPLER_MODE: Env.schema.string.optional(),
OTEL_SAMPLER_RATIO: Env.schema.string.optional(),
OTEL_SERVICE_NAME: Env.schema.string.optional(),
// Remote logging
LOG_HOST: Env.schema.string.optional(),
LOG_PORT: Env.schema.number.optional(),
LOG_PROTOCOL: Env.schema.string.optional(),
// Security
HASH_KEY: Env.schema.string.optional(),
})