Files
Infosec/Alert Hub System/.env.example
T
2026-09-13 20:09:20 +01:00

80 lines
3.0 KiB
Bash

# =============================================================================
# AlertHub Configuration
# All configuration is done here. NEVER commit your real .env to source control.
# =============================================================================
# ---- Flask Core ----
# Generate a strong key: python -c "import secrets; print(secrets.token_hex(32))"
SECRET_KEY=change-me-to-a-long-random-string-please-generate-with-secrets-module
FLASK_ENV=production
# ---- Ports ----
# AlertHub now runs as a SINGLE service on one port. The admin backoffice is
# served on the same port under the /backoffice path (admins only).
FRONTOFFICE_PORT=8080
# BACKOFFICE_PORT is no longer used (the backoffice shares the main port under
# /backoffice). It is kept here only so old .env files remain valid; you can
# safely delete it.
# BACKOFFICE_PORT=9001
# ---- Gunicorn (optional) ----
# Keep GUNICORN_WORKERS at 1 so the reminder scheduler runs exactly once.
# Increase GUNICORN_THREADS for more concurrency instead.
GUNICORN_WORKERS=1
GUNICORN_THREADS=4
# ---- Database ----
DATABASE_PATH=/data/alerthub.db
# ---- Initial Administrator ----
# There is NO seeded admin any more. On first launch, open the app and you'll be
# taken to a one-time "Create administrator" screen to set the username &
# password yourself. (The variables below are legacy/no-ops, kept for reference.)
# INITIAL_ADMIN_USERNAME=admin
# INITIAL_ADMIN_EMAIL=admin@example.com
# INITIAL_ADMIN_PASSWORD=
# ---- Session / Security ----
# Set SESSION_COOKIE_SECURE=true if you serve via HTTPS (recommended in production)
SESSION_COOKIE_SECURE=false
SESSION_LIFETIME_HOURS=8
PASSWORD_MIN_LENGTH=10
# ---- MFA ----
# MFA is optional and self-service: any user can enable it from Account → MFA.
MFA_ISSUER_NAME=AlertHub
# ---- Scheduler ----
# How often (in minutes) the scheduler checks alerts and dispatches reminder emails
SCHEDULER_INTERVAL_MINUTES=60
# ---- Default Reminder Lead Times (in days) ----
# Comma-separated list. Configurable per-alert later, but these are defaults.
DEFAULT_REMINDER_DAYS=30,14,7,1
# ---- SMTP / Outgoing mail (Purelymail defaults) ----
# Note: these values seed the DB on first run only. After that, edit them in
# the backoffice at /mail-config.
# Purelymail SMTP: smtp.purelymail.com : 465 (SSL/TLS)
# If your client only supports STARTTLS, use port 587 with SMTP_ENCRYPTION=starttls
SMTP_HOST=smtp.purelymail.com
SMTP_PORT=465
SMTP_USERNAME=you@yourdomain.com
SMTP_PASSWORD=
SMTP_ENCRYPTION=ssl
# Allowed: none | starttls | ssl
SMTP_FROM_ADDRESS=you@yourdomain.com
SMTP_FROM_NAME=AlertHub Notifications
# ---- IMAP / Sent-folder copy (Purelymail defaults) ----
# When a mail is sent from the platform, a copy is appended to the mailbox's
# Sent folder over IMAP so it shows up in your normal mail client.
# Purelymail IMAP: imap.purelymail.com : 993 (SSL/TLS)
# Leave IMAP_USERNAME / IMAP_PASSWORD blank to reuse the SMTP credentials.
IMAP_HOST=imap.purelymail.com
IMAP_PORT=993
IMAP_USERNAME=
IMAP_PASSWORD=
IMAP_SENT_FOLDER=Sent