# ============================================================================= # Modyrn environment configuration # # Copy this file to `.env` and fill in the values. # cp .env.example .env # # Only the variables in "1. REQUIRED" need your attention for a standard Docker # deployment. Everything else has safe defaults. # ============================================================================= # ----------------------------------------------------------------------------- # 1. REQUIRED — you must set these # ----------------------------------------------------------------------------- # The single public URL where people access Modyrn (the dashboard). This is the # ONLY address that needs to be reachable from the internet. Use https:// in # production (behind a reverse proxy). No trailing slash. # dev: http://localhost:3000 # prod: https://modyrn.example.com PUBLIC_URL=http://localhost:3000 # Discord application credentials. # Create an app at https://discord.com/developers/applications # - Client ID / Secret come from the "OAuth2" page. # - Token comes from the "Bot" page. # - Public Key comes from the "General Information" page. # In the OAuth2 -> Redirects settings, add EXACTLY: # /api/v1/auth/discord/callback DISCORD_CLIENT_ID= DISCORD_CLIENT_SECRET= DISCORD_TOKEN= DISCORD_PUBLIC_KEY= # Secrets. Generate strong random values — do NOT ship the examples. # JWT_SECRET: any long random string. e.g. openssl rand -hex 32 # ENCRYPTION_KEY: EXACTLY 32 bytes = 64 hex chars (AES-256-GCM). # e.g. openssl rand -hex 32 JWT_SECRET= ENCRYPTION_KEY= # ----------------------------------------------------------------------------- # 2. DOCKER DEPLOYMENT — sensible defaults, change if you like # ----------------------------------------------------------------------------- # With `docker compose up -d`, Postgres and Redis run as containers and the API # talks to them over the internal Docker network. You normally only change the # database password. POSTGRES_USER=modyrn POSTGRES_PASSWORD=change-me POSTGRES_DB=modyrn # Host port the dashboard is published on. Put a reverse proxy (Caddy, Traefik, # Nginx) in front of this for TLS in production. The API is NOT published — the # dashboard proxies to it internally. DASHBOARD_PORT=3000 # Which published image tag to run (see the container registry). MODYRN_VERSION=latest # Logging verbosity: fatal | error | warn | info | debug | trace LOG_LEVEL=info # ----------------------------------------------------------------------------- # 3. LOCAL DEVELOPMENT ONLY — ignore these for a Docker deployment # ----------------------------------------------------------------------------- # When running the apps on your host with `pnpm dev` (and only Postgres + Redis # in Docker via docker/docker-compose.dev.yml), the apps read these connection # strings directly instead of the ones the production compose builds for you. NODE_ENV=development # The apps connect to the dev containers on localhost: DATABASE_URL=postgresql://modyrn:modyrn@localhost:5432/modyrn REDIS_URL=redis://localhost:6379 # Internal, server-to-server address the dashboard uses to reach the API. This # is never exposed to the browser. In Docker it is set automatically to # http://api:4000; for local dev it points at your local API. API_URL=http://localhost:4000 # Port the API listens on (internal). API_PORT=4000