Sign inSign up

derfnull/db-fakedisplay

By derfnull

•Updated 2 months ago

DB Infoscreen

Image
0

50K+

derfnull/db-fakedisplay repository overview

⁠db-infoscreen - App/Infoscreen for Railway Departures in Germany

This is a read-only README copy. It is not synced automatically and may be outdated. Please refer to the db-infoscreen homepage⁠ for up-to-date build and usage instructions.

db-infoscreen (formerly db-fakedisplay) shows departures at german train stations, serving both as infoscreen / webapp and station board look-alike.

Thanks to the undocumented IRIS backend, it usually has very detailed information about delay reasons and service limitations.

There's a public db-infoscreen service on finalrewind.org⁠. You can also host your own instance if you like, see the Setup notes below.

⁠Dependencies

  • perl >= 5.20
  • carton or cpanminus
  • build-essential
  • git

⁠Installation

After installing the dependencies, clone the repository using git, e.g.

git clone https://git.finalrewind.org/db-fakedisplay

Make sure that all files (including .git, which is used to determine the software version) are readable by your www user, and follow the steps in the next sections.

⁠Perl Dependencies

db-infoscreen depends on a set of Perl modules which are documented in cpanfile. After installing the dependencies mentioned above, you can use carton or cpanminus to install Perl depenencies locally.

In the project root directory (where cpanfile resides), run either

carton install

or

cpanm --installdeps .

and set PERL5LIB=.../local/lib/perl5 before running index.pl or wrap it with carton exec hypnotoad index.pl.

⁠Setup

db-infoscreen respects the following environment variables:

VariableDefaultDescription
DBFAKEDISPLAY_LISTENhttp://*:8092IP and Port for web service
DBFAKEDISPLAY_STATSNoneFile in which the total count of backend API requests (excluding those answered from cache) is written
DBFAKEDISPLAY_HAFAS_CACHE/tmp/dbf-hafasDirectory for HAFAS cache
DBFAKEDISPLAY_IRIS_CACHE/tmp/dbf-iris-mianDirectory for IRIS schedule cache
DBFAKEDISPLAY_IRISRT_CACHE/tmp/dbf-iris-realtimeDirectory for IRIS realtime cache
DBFAKEDISPLAY_WORKERS2Number 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 pass requests for db-infoscreen to the appropriate port. See the examples directory for imprint and privacy policy samples.

You can 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). A systemd unit example is provided in examples/db-infoscreen.service.

All code in this repository may be used under the terms of the BSD-2-Clause (db-infoscreen, see COPYING) and MIT (jquery, jqueryui, and marquee libraries; see the respective files) licenses. Attribution is appreciated.

⁠System requirements

Resource requirements depend on usage. For a few requests per second, about 200MB (600k inodes) cache and one or two CPU cores should be sufficient. db-infoscreen typically needs 50MB RAM per worker process, though calculating with 100MB per worker is recommended to leave a safety margin.

Tag summary

Content type

Image

Digest

sha256:dfb3f092e…

Size

119.4 MB

Last updated

2 months ago

docker pull derfnull/db-fakedisplay