templates / postgres
Files
Tested with PostgreSQL 18.
Threat map database
The schema used by the threat map feeds and dashboards.
01-schema.sqlcreates the tables (attack_events,ip_sightings,enrichment) and theingest_healthandip_profileviews.02-grafana-ro.shcreates agrafana_rologin with read-only access. It runs only if a password is mounted at/run/secrets/grafana_ro_password.
Setup
Run Postgres with POSTGRES_DB=threatmap and POSTGRES_USER=threatmap, and mount this folder at /docker-entrypoint-initdb.d/. Both scripts run once, on first init of an empty volume.