summaryrefslogtreecommitdiff
path: root/examples/travelynx.conf
blob: 81ecd9f149a9a37008616162fe3d29677ad10552 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# vim:ft=perl
# 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'.

{
	# Cache directories for schedule and realtime data. Mandatory.  The parent
	# directory ('/var/cache/travelynx' in this case) must already exist.
	cache => {
		schedule => '/var/cache/travelynx/iris',
		realtime => '/var/cache/travelynx/iris-rt',
	},

	# Database configuration. host and port are optional
	# (defaulting to localhost:5432), the rest is mandatory.
	db => {
		host => 'localhost',
		port => 5432,
		database => 'travelynx',
		user => 'travelynx',
		password => die("Changeme!"),
	},

	# These settings control the amount and (re)spawn behaviour of travelynx
	# worker processes as well as IP, port, and PID file. They are suitable for
	# up to a few dozen concurrent users. If your site has more traffic, you
	# may want to increase the number of worker processes.
	# See the Mojo::Server::Hypnotoad manual for details.
	hypnotoad => {
		accepts  => 100,
		clients  => 10,
		listen   => [ 'http://127.0.0.1:8093' ],
		pid_file => '/tmp/travelynx.pid',
		workers  => 2,
		spare    => 2,
	},

	mail => {
		# If you want to disable outgoing mail for development purposes,
		# uncomment the following line.  Mails will instead be logged as
		# Mojolicious "info" messages, causing their content to be printed on
		# stdout.
		## disabled => 1,

		# Otherwise, specify the sender ("From" field) for mail sent by travelynx
		# here.  E.g. 'Travelynx <mail@example.org>'
		from => die("Changeme!"),
	},

	# Secrets used for cookie signing and verification. Must contain at least
	# one random string. If you specify several strings, the first one will
	# be used for signing new cookies, and the remaining ones will still be
	# accepted for cookie validation.
	secrets => [
		die("Changeme!"),
	],

	version => qx{git describe --dirty} // 'experimental',
};