summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-10-27 19:15:39 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-10-27 19:15:39 +0200
commitcfe1bcb84ae8f9ba7499bab20844fa00bce52ec0 (patch)
treed18f032d91fbc50430ab04df555fc616d503a522 /README.md
parent7656690f4666a4fdfdf1b08335827a5c25f84fa2 (diff)
README: Configuration/Setup, System Requirements
Diffstat (limited to 'README.md')
-rw-r--r--README.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7d6b188
--- /dev/null
+++ b/README.md
@@ -0,0 +1,44 @@
+db-fakedisplay - Infoscreen for DB departures
+---------------------------------------------
+
+* <http://finalrewind.org/projects/db-fakedisplay/>
+
+Dependencies
+------------
+
+ * perl >= 5.10
+ * Cache::File (part of the Cache module)
+ * Mojolicious
+ * Mojolicious::Plugin::BrowserDetect
+ * Travel::Status::DE::DeutscheBahn >= 2.03
+ * Travel::Status::DE::IRIS >= 1.21
+
+Setup
+-----
+
+db-fakedisplay respects the following environment variables:
+
+| Variable | Default | Description |
+| :------- | :------ | :---------- |
+| DBFAKEDISPLAY\_LISTEN | `http://*:8092` | IP and Port for web service |
+| DBFAKEDISPLAY\_STATS | _None_ | File in which the total count of backend API requests (excluding those answered from cache) is written |
+| DBFAKEDISPLAY\_HAFAS\_CACHE | `/tmp/dbf-hafas` | Directory for HAFAS cache |
+| DBFAKEDISPLAY\_IRIS\_CACHE | `/tmp/dbf-iris-mian` | Directory for IRIS schedule cache |
+| DBFAKEDISPLAY\_IRISRT\_CACHE | `/tmp/dbf-iris-realtime` | Directory for IRIS realtime cache |
+| DBFAKEDISPLAY\_WORKERS | 2 | Number of concurrent worker processes |
+
+Set these as needed, create `templates/imprint.html.ep` (imprint) and
+`templates/privacy.html.ep` (privacy policy), and configure your web server to
+reverse proxy requests for db-fakedisplay to the appropriate port.
+
+You can then run the app using a Mojo::Server of your choice, e.g. **perl
+index.pl daemon -m production** (quick&dirty, does not respect all variables)
+or **hypnotad** (recommended).
+
+System requirements
+-------------------
+
+Resource requirements depend on usage. For a few requests per second, about
+50MB (150k inodes) cache and one or two CPU cores should be sufficient.
+db-fakedisplay typically needs 50MB RAM per worker process, though calculating
+with 100MB per worker is recommended to have an appropriate safety margin.