# Copy to config.ini (gitignored — never commit real creds; chmod 600). # # SINGLE SOURCE OF CONFIG. On staging/prod (pair) this file lives at the # remote docroot and the app reads EVERYTHING from it at boot # (ngsite.settings.load_config). deploy.sh no longer bakes any config into # passenger_wsgi.py — it ships code only and ABORTS if this file is absent. # (Each value can still be overridden by its env var — NGSITE_DB_*, # NGSITE_ENV, NGSITE_SECRET_KEY, NGSITE_PUBLIC_URL_ROOT, NGSITE_MAIL_* — # env wins over this file. Normally unused now that config lives here.) # # DEV -> the local mirror DB (arpartsfinder_dev / apfdev), kept fresh by # the scanner. See scanner-ng/devdb_mirror_schema.sql. # PROD/STAGING -> vdb1b.pair.com / easyperl_inventory. [app] # dev | prod. staging runs as prod (no debug, real DB). env = dev # Flask session-signing key. REQUIRED on staging/prod (32+ random bytes, # e.g. `python3 -c 'import secrets; print(secrets.token_urlsafe(48))'`). # Set ONCE and keep stable — changing it logs every user out. On a host # that previously used the deploy-managed ~/.ngsite---secret # file, paste THAT value here to preserve sessions. Empty in dev = a # random per-process key (sessions reset on restart; fine for dev). secret_key = # Absolute URL root for building outbound links (magic-link emails etc.) # without trusting the request Host header. REQUIRED on staging/prod. public_url_root = # Google Analytics 4 measurement ID (e.g. G-XXXXXXXX). Set this ONLY in the # PROD config to turn analytics on. Leave it UNSET on dev/staging so test # traffic never hits the live GA property (staging runs as prod otherwise, # which would pollute it). Empty = no analytics. ga_measurement_id = [db] host = 127.0.0.1 port = 3306 name = arpartsfinder_dev user = apfdev password = changeme [mail] # Outbound mail backend. See ngsite/mail.py for the full list. # console : print to stdout (dev default; no real sends) # file : append to file_path (handy on a host where stdout is # hard to tail) # sendmail : pipe to the host's /usr/sbin/sendmail # smtp : authenticated SMTP submission (staging + prod) # DEV typically leaves this at console; STAGING and PROD use smtp. transport = smtp # From: address on outbound mail. Apex identity for prod transactional # (magic links, restock alerts); staging uses its own subdomain mailbox. from_addr = noreply@arpartsfinder.com # --- smtp backend (used when transport = smtp) --- # pair VPS Postfix submission host. Mail egresses directly from the # VPS's dedicated IP (verified 2026-06-02 from real headers — not a # shared pair relay), so SPF/DKIM/DMARC align and reputation is # self-contained. See memory: site-ng-email-transport-prod-decision. smtp_host = easyperl.mail.pairserver.com smtp_port = 587 smtp_user = noreply@arpartsfinder.com # The mailbox password is the ONE secret that never goes in this example # or in git — set it only in the real config.ini on each host (mode 600). smtp_password = # "1" = STARTTLS on the 587 submission port (standard); "0" = plain. smtp_tls = 1 # Path for transport = file (relative resolves under the app root). file_path = tmp/mail.log