summaryrefslogtreecommitdiff
path: root/examples/travelynx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'examples/travelynx.conf')
-rw-r--r--examples/travelynx.conf64
1 files changed, 63 insertions, 1 deletions
diff --git a/examples/travelynx.conf b/examples/travelynx.conf
index 7f15d12..f8eaac0 100644
--- a/examples/travelynx.conf
+++ b/examples/travelynx.conf
@@ -2,9 +2,22 @@
# travelynx.conf must be a valid perl hash reference. String values must be
# quoted and hash items must end with a comma. You can access environment
# variables via $ENV, e.g. by writing $ENV{TRAVELYNX_DB_HOST} instead of
-# 'localhost'.
+# 'localhost'. You can validate via 'perl -c travelynx.conf'.
{
+ # Optional announcement, e.g. to indicate maintenance or backend issues.
+ #announcement => 'The IRIS backend is flaky. Real-time data may not be available.',
+
+ # Base URL of this travelynx installation, e.g. "https://travelynx.de" for
+ # travelynx.de. Used to identify this travelynx instance when performing API
+ # requests (so API providers know whom to contact case of issues) and for
+ # imprint and other links in travelynx E-Mails. Note that this entry is
+ # only used when travelynx is performing requests or sending E-mails from
+ # a "work", "worker", or "maintenance" job. Otherwise, it will infer the
+ # base URL from the HTTP request. If your travelynx instance is reachable
+ # via multiple URLs, use any one of them.
+ base_url => Mojo::URL->new('https://FIXME.local'),
+
# Cache directories for schedule and realtime data. Mandatory. The parent
# directory ('/var/cache/travelynx' in this case) must already exist.
cache => {
@@ -36,6 +49,14 @@
spare => 2,
},
+ influxdb => {
+ # travelynx can log statistics and performance attributes to InfluxDB.
+ # To do so, create a travelynx database in your InfluxDB, and point url
+ # (below) to the corresponding write URL. The URL may use anything from
+ # plain HTTP to HTTPS with password authentication.
+ ## url => 'https://user:password@host/write?db=travelynx',
+ },
+
mail => {
# To disable outgoing mail for development purposes, uncomment the
# following line. Mails will instead be logged as Mojolicious "info"
@@ -76,5 +97,46 @@
die("Changeme!"),
],
+ # optionally, users can link travelynx and traewelling accounts, and
+ # automatically synchronize check-ins.
+ # To do so, you need to create a travelynx application on
+ # <https://traewelling.de/settings/applications>. The application
+ # must be marked as "Confidential" and have a redirect URL that matches
+ # $base_url/oauth/traewelling, where $base_url refers to the URL configured
+ # above. For instance, travelynx.de uses
+ # 'https://travelynx.de/oauth/traewelling'. An incorrect redirect URL will
+ # cause OAuth2 to fail with unsupported_grant_type.
+ #
+ # Note that the travelynx/traewelling OAuth2 integration does not support
+ # travelynx installations that are reachable on multiple URLs at the
+ # moment -- linking a traewelling account is only possible when accessing
+ # travelynx via the base URL.
+ traewelling => {
+
+ # Uncomment the following block and insert the application ID and
+ # secret obtained from https://traewelling.de/settings/applications
+ # -> your application -> Edit.
+
+ #oauth => {
+ # id => 1234,
+ # secret => 'mysecret',
+ #}
+
+ # By default, the "work" or "worker" command does not just update
+ # real-time data of active journeys, but also performs push and pull
+ # synchronization with traewelling for accounts that have configured it.
+ # Traewelling pull synchronization currently relies on polling the user
+ # status on traewelling.de, so large travelynx instances may want to
+ # run pull synchronization less frequently than regular "work" commands
+ # and traewelling push synchronization.
+ #
+ # To do so, uncomment "separate_worker" below and create a cronjob that
+ # periodically runs "perl index.pl traewelling" (push and pull) or
+ # two separate cronjobs that run "perl index.pl traewelling push" and
+ # "perl index.pl traewelling pull", respectively.
+
+ # separate_worker => 1,
+ },
+
version => qx{git describe --dirty} // 'experimental',
};