92 lines
3.0 KiB
Bash
92 lines
3.0 KiB
Bash
# RayLab Core - contoh konfigurasi environment
|
|
# Salin file ini menjadi .env dan isi nilai-nilai sensitif sesuai environment Anda.
|
|
# Jangan commit .env yang berisi secrets ke VCS.
|
|
|
|
########################
|
|
# Database (Postgres)
|
|
########################
|
|
# URL koneksi Postgres untuk Prisma.
|
|
# Contoh: postgresql://user:password@localhost:5432/raylab
|
|
DATABASE_URL="postgresql://raylab:password@localhost:5432/raylab"
|
|
|
|
# Catatan penting: migration menggunakan fungsi UUID di migration SQL.
|
|
# Pastikan database memiliki ekstensi yang sesuai:
|
|
# - Jika migration menggunakan gen_random_uuid(): pasang pgcrypto
|
|
# SQL: CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
|
# - Jika ingin gunakan uuid_generate_v4(): pasang uuid-ossp
|
|
# SQL: CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";
|
|
|
|
########################
|
|
# Internal JWT (RayLab)
|
|
########################
|
|
# Secret untuk menandatangani JWT internal (hingga JwtModule digunakan).
|
|
# Ganti dengan secret yang kuat di produksi.
|
|
RAYLAB_JWT_SECRET="replace-with-a-strong-secret"
|
|
|
|
########################
|
|
# Authentik / OIDC (Identity Provider)
|
|
########################
|
|
# Issuer base URL dari Authentik / OIDC provider (wajib untuk verifikasi token)
|
|
# Contoh: https://auth.example.com
|
|
AUTHENTIK_ISSUER="https://auth.example.com"
|
|
|
|
# Audience (aud) yang diharapkan pada token OIDC (opsional)
|
|
AUTHENTIK_AUDIENCE="raylab"
|
|
|
|
# JWKS URI jika ingin override. Jika kosong, akan dibentuk dari AUTHENTIK_ISSUER + "/.well-known/jwks.json"
|
|
AUTHENTIK_JWKS_URI=""
|
|
|
|
########################
|
|
# Redis (opsional, beberapa fitur)
|
|
########################
|
|
# Aktifkan/Nonaktifkan Redis (default true).
|
|
REDIS_ENABLED="true"
|
|
|
|
# URL Redis (contoh: redis://localhost:6379). Hanya dipakai bila REDIS_ENABLED=true
|
|
REDIS_URL="redis://localhost:6379"
|
|
|
|
########################
|
|
# Server / Aplikasi
|
|
########################
|
|
# Base URL aplikasi (dipakai pada integration tests / helper)
|
|
BASE_URL="http://localhost:3000"
|
|
|
|
# Port aplikasi
|
|
PORT="3000"
|
|
|
|
# Node environment
|
|
NODE_ENV="development"
|
|
|
|
# Log level (debug/info/warn/error)
|
|
LOG_LEVEL="debug"
|
|
|
|
########################
|
|
# Admin / Test accounts (opsional, dipakai tests/integration jika diperlukan)
|
|
########################
|
|
# Akun admin untuk keperluan pengujian/integrasi (hanya contoh)
|
|
ADMIN_USERNAME="admin"
|
|
ADMIN_PASSWORD="changeme"
|
|
|
|
# Informasi akun uji (opsional)
|
|
TEST_USER_EMAIL="test-integration@example.com"
|
|
TEST_USER_USERNAME="test-integration"
|
|
TEST_USER_PASSWORD="StrongP@ssw0rd!"
|
|
|
|
# Expire time for test tokens (detik)
|
|
TEST_TOKEN_EXPIRES_IN="3600"
|
|
|
|
########################
|
|
# Optional / Integration hints
|
|
########################
|
|
# Jika Anda menggunakan penyedia lain atau menambahkan variabel tambahan,
|
|
# tambahkan di sini. Contoh:
|
|
# SSO_CALLBACK_URL="http://localhost:3000/auth/callback"
|
|
# MAILER_* variables, STORAGE_*, dsb.
|
|
|
|
########################
|
|
# Security reminders
|
|
########################
|
|
# - Jangan commit file .env dengan secrets.
|
|
# - Gunakan secret manager di production (Vault, AWS Secrets Manager, ..).
|
|
# - Pastikan DATABASE_URL menunjuk ke database yang benar dan aman.
|
|
# - Pastikan AUTHENTIK_ISSUER dan JWKS dapat diakses dari RayLab instance. |