Skip to content

Configuration

You can use environment variables to configure the application. The supported parameters and their corresponding environment variables are listed below in the following format:

// ENV_VARIABLE_NAME DEFAULT_VALUE
type Config struct {
    // Latitude and Longitude coordinates of the location you want to use.
    // LOCATION_LATITUDE 51.17348
    // LOCATION_LONGITUDE 5.45921
    Location geodist.Coord

    // Maximum range in kilometers from the location that you want aircraft to be spotted.
    // Note that this is an approximation due to roundings.
    // MAX_RANGE_KILOMETERS 30
    MaxRangeKilometers int

    // Maximum altitude in feet that you want to spot aircraft at.
    // Set to 0 to disable the filter.
    // MAX_ALTITUDE_FEET 0
    MaxAltitudeFeet int

    // A comma seperated list of types that you want to spot
    // If not set, 'ALL' will be used, which will disable the filter and show all aircraft within range.
    // Full list can be found at https://www.icao.int/publications/doc8643/pages/search.aspx in 'Type Designator' column.
    // AIRCRAFT_TYPES ALL
    // EXAMPLES
    // AIRCRAFT_TYPES F16,F35
    // To spot all military aircraft, you can use MILITARY.
    // AIRCRAFT_TYPES MILITARY
    AircraftTypes []string

    // Maximum amount of aircraft to show in a single slack message.
    // Note that a single slack message only supports up to 50 'blocks' and each aircraft that we display has multiple blocks.
    // MAX_AIRCRAFT_SLACK_MESSAGE 8
    MaxAircraftSlackMessage int

    // Webhook used to send notifications to Slack. If not set, no messages will be sent to Slack.
    // SLACK_WEBHOOK_URL ""
    SlackWebHookURL string

    // Webhook used to send notifications to Discord. If not set, no messages will be sent to Discord.
    // DISCORD_WEBHOOK_URL ""
    DiscordWebHookURL string

    // Discord notifications use an embed color based on the alitute of the aircraft.
    // DISCORD_COLOR_ALTITUDE "true"
    DiscordColorAltitude string

    // Interval in seconds between fetching aircraft, minimum is 60 due to API rate limiting.
    // FETCH_INTERVAL 60
    FetchInterval int

    // Token to authenticate with the gotify server.
    // GOTIFY_TOKEN ""
    GotifyToken string

    // URL of the gotify server.
    // GOTIFY_URL ""
    GotifyURL string

    // Port where metrics will be exposed on
    // METRICS_PORT "7070"
    MetricsPort string

    // Topic to publish message to
    // NTFY_TOPIC ""
    NtfyTopic string

    // URL of the ntfy server.
    // NTFY_SERVER "https://ntfy.sh"
    NtfyServer string
}