Skip to main content

Configuration Reference

Environment Variables

Core

VariableDefaultDescription
REDIS_HOSTlocalhostRedis hostname
REDIS_PORT6379Redis port
API_GATEWAY_PORT3001API Gateway listen port
CORS_ORIGINhttp://localhost:3000Allowed CORS origin
NODE_ENVdevelopmentNode environment
WEB_PORT3000Next.js dev server port
API_GATEWAY_URLhttp://localhost:3001Gateway URL used by rewrites for /auth/* and /graphql

Keycloak (api-gateway)

VariableDefaultDescription
KEYCLOAK_ISSUER-Keycloak realm issuer URL
KEYCLOAK_JWKS_URI-Keycloak JWKS endpoint
KEYCLOAK_CLIENT_IDluckyplans-frontendKeycloak client ID
KEYCLOAK_CLIENT_SECRET-Client secret from Keycloak
KEYCLOAK_ADMIN_URLhttp://localhost:8080Base URL for Keycloak Admin API

Session Management (api-gateway)

VariableDefaultDescription
SESSION_SECRET-Secret for signing session cookies
WORKER_CREDENTIAL_PEPPER-Secret pepper used when hashing and verifying worker credentials
SESSION_TTL_SECONDS36000Session TTL in seconds

Database

VariableDefaultDescription
DATABASE_URL-PostgreSQL connection string for Prisma

MinIO

VariableDefaultDescription
MINIO_ENDPOINTlocalhostMinIO hostname
MINIO_PORT9000MinIO API port
MINIO_ACCESS_KEYminioadminMinIO access key
MINIO_SECRET_KEYminioadminMinIO secret key
MINIO_BUCKETluckyplans-uploadsBucket name
MINIO_USE_SSLfalseEnable SSL for MinIO

Environment variables are accessed through getEnvVar(key, defaultValue?) from @luckyplans/shared. Required variables throw when missing.

The product web app uses a relative /graphql URL in local development. The landing SPA has separate build-time URLs for app and docs navigation.

Helm Values

Helm values are defined in infrastructure/helm/luckyplans/values.yaml.

Key Sections

SectionPurpose
config.*Application config rendered into the ConfigMap
secretsPlain-text dev secrets rendered into a Kubernetes Secret
sealedSecrets.*Encrypted prod secrets rendered as a SealedSecret
image.*Container registry and pull policy
ingress.*Traefik ingress configuration
certManager.*Let's Encrypt TLS automation
redis.*Redis deployment config
postgresql.*PostgreSQL deployment config
keycloak.*Keycloak deployment config
apiGateway.*API gateway deployment config
landing.*Landing SPA deployment config and baked build args
serviceCore.*Core service deployment config
web.*Product web deployment config

Production Overrides

Production-specific values live in infrastructure/helm/luckyplans/values.prod.yaml.

Production Secrets

Production secrets are encrypted in values.prod.yaml under sealedSecrets.encryptedData. The Sealed Secrets controller decrypts them at runtime.

Example scaling

apiGateway:
replicas: 3

landing:
replicas: 2

web:
replicas: 2