towerops/config/prod.exs
Graham McIntire a4e08b2aca Major codebase cleanup: DRY schemas, remove dead config, consolidate modules
- Created Towerops.Schema base macro (95+ schemas updated to use it)
- Created Towerops.Snmp.Reading macro (7 reading schemas consolidated)
- Created Towerops.Gaiia.BaseSchema macro (4 Gaiia schemas consolidated)
- Created Towerops.SyncLog shared module (UISP + Preseem merge)
- Created Towerops.LogFilters (3 log filter modules merged into 1)
- Created Towerops.OnCall.ChangesetHelpers (9 on-call schemas simplified)
- Created API v1 ResourceController shared helpers (7 controllers)
- Extracted ConnectionHelpers.format_connection_result (2 LiveViews)
- Removed 5 dead config keys (scopes, mib_dirs, stripe_meter_id, etc.)
- Fixed 2 pre-existing broken tests
- All 13,219 tests pass, Credo clean (0 issues)
2026-06-16 15:29:22 -05:00

47 lines
1.6 KiB
Elixir

import Config
# Filter out harmless Oban shutdown messages, repetitive SNMP MIB errors, and noisy health checks
config :logger, :default_handler,
filters: [
drop_oban_shutdown: {
&Towerops.LogFilters.drop_oban_shutdown/2,
[]
},
drop_snmp_mib_errors: {
&Towerops.LogFilters.drop_snmp_mib_errors/2,
[]
},
filter_health_checks: {
&Towerops.LogFilters.filter_health_checks/2,
[]
}
]
# Do not print debug messages in production
config :logger,
level: :info,
metadata_filter: [oban_shutdown_filter: true]
# Configure Swoosh API Client
config :swoosh, api_client: Swoosh.ApiClient.Req
# Disable Swoosh Local Memory Storage
config :swoosh, local: false
# Note we also include the path to a cache manifest
# containing the digested version of static files. This
# manifest is generated by the `mix assets.deploy` task,
# which you should run after static files are built and
# before starting your production server.
config :towerops, ToweropsWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
# SSL/TLS is handled by Cloudflared proxy - no force_ssl needed
# Coverage rasters live on the shared NFS mount so all replicas can serve
# them and a pod restart doesn't lose computed predictions. The
# deployment mounts the NFS share at /data.
config :towerops, :coverage_storage_dir, "/data/coverage"
# Cloudflared terminates TLS in front of the app, so requests reach Phoenix
# over HTTP — but cookies must still carry the Secure attribute so a
# downgrade attack or misconfigured route can't leak them over cleartext.
config :towerops, :secure_cookies, true