# ---------------------------------------------------------------------------
# apicdbms — the ONLY env file. The same .env ships to local and production;
# nothing is edited at deploy time.
#
# The request host decides what is used (Support/Host.php):
#   localhost / 127.0.0.1 / ::1  -> DB_*        + APP_DEBUG honoured
#   any other host (prod domain) -> DB_PROD_*   + errors always terse
#
# That switch is deliberate: a local request can never reach the production
# database, even though the production credentials sit in this file.
# ---------------------------------------------------------------------------

# --- Auth: clients must send header  Staticauth: <this value> ---
# Matches the main CDBMS app's config('jwt_key') so existing clients work.
FORM_API_KEY=eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiU3VwZXJBZG1pbiIsIklzc3VlciI6ImpheWFyYW0iLCJVc2VybmFtZSI6InZheWFsYSIsImV4cCI6MTc2NDkzODE2OSwiaWF0IjoxNzMzNDAyMTY5fQ.6NsJR0TuPEZiSYRlb1Ku_6sX12xTJILEeHGS93y8CPo

# --- Local database (used for localhost traffic) ---
DB_HOSTNAME=localhost
DB_USERNAME=root
DB_PASSWORD=
DB_DATABASE=i_cdbms

# --- Production database (used for every non-localhost host) ---
# Shared with i_cdbms: same DB as its DB_PROD_* block, so both apps read one schema.
DB_PROD_HOSTNAME=localhost
DB_PROD_USERNAME=irisworkspace_idbms_user
DB_PROD_PASSWORD="9YCXtrkJ(ir(u{H7"
DB_PROD_DATABASE=irisworkspace_idbms_db

# --- AWS S3 (abstract-file uploads) ---
# NOTE: this app reads AWS_BUCKET. i_cdbms calls the same thing AWS_S3_BUCKET —
# do not copy that name across or uploads silently fall back to 'magnus-group'.
AWS_ACCESS_KEY_ID=AKIA2NTNHA6ZYPKQID7U
AWS_SECRET_ACCESS_KEY=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
AWS_REGION=eu-north-1
AWS_BUCKET=iris-scientific

# --- Error verbosity ---
# 1 = show exception details in JSON errors. Only ever applied to localhost
# requests, so leaving this at 1 is safe for the deployed copy.
APP_DEBUG=1

# --- CMS-compatible read surface (/api/conferences/pc_1, /api/speakers/pc_1) ---
# CMS_API_USERNAME/PASSWORD gate POST /api/auth/login; CMS_JWT_SECRET signs the
# Bearer token it returns. Must match the Node wrapper's JWT_SECRET if both
# services are live at once, so one token works against either.
CMS_API_USERNAME=jayaram
CMS_API_PASSWORD=e7geYgBmTIeLWG0OvpwXKX4iVzsEaJeH
CMS_JWT_SECRET=f53be27e9017d65998154e7895e180ab0bda57b0f94f49f7872a58d51e4201ef
CMS_JWT_TTL_DAYS=365
