This repository has been archived by the owner on Jul 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
conch.conf.dist
152 lines (124 loc) · 5.91 KB
/
conch.conf.dist
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{
# Secrets used for HMAC-signed (not encrypted!) cookies and tokens. Only
# the first is used to create new signatures, but all of them for
# verification. This is for rotating in new passphrases and rotating out
# old ones.
secrets => ["hunter2"],
authentication => {
# time in seconds for a login token and/or persistent session cookie to be valid before requiring refresh or re-auth
system_admin_expiry => 2592000, # 30 days
normal_expiry => 86400, # 1 day
# used for api tokens only
custom_token_expiry => 86400*365*5, # 5 years
},
database => {
# dsn is as defined in https://metacpan.org/pod/DBI#connect
# and https://metacpan.org/pod/DBD::Pg#connect:
# dbi:DriverName:dbname=database_name[;host=hostname[;port=port]]
dsn => 'dbi:Pg:dbname=conch;host=localhost',
username => 'conch',
password => 'conch',
# ro_username, ro_password are used for ro connection when available.
options => {
'client_encoding' => 'UTF-8',
},
},
mail => {
# all these configs are provided as-is to Email::Sender::Transport::SMTP.
transport => {
timeout => 10,
host => 'relay.joyent.us',
# port
# ssl
# ..etc
},
# the host used for the From header in all email, if not provided
from_host => 'joyent.com',
},
rollbar => {
# Rollbar access token: must have scope "post_server_item" or "post_client_item".
# You can generate one from https://rollbar.com/$account/$application/settings/access_tokens/
# access_token => '00000000000000000000000000000000',
# Optional environment string override for rollbar exceptions. If not
# present, uses the value of $app->mode ('production' with Hypnotoad).
# environment => 'staging',
# a hash of regexes that are matched against the named request header:
# if there is a match, all 4xx responses (other than 401, 404) are
# forwarded to rollbar
# error_match_header => {
# 'X-Conch-UI' => qr/^v4.[3-9]/, # forward errors for X-Conch-UI 4.3 and later
# 'User-Agent' => qr/^Conch\/(3.1|2.6.0$)/, # " for Conch/3.1* or Conch/2.6.0 exactly
# },
# warn_payload_elements => 50,
# warn_payload_size => 10000,
},
features => {
rollbar => 0,
nytprof => 0,
# Stop issuing 'conch' cookies. This does not prevent existing conch
# cookies from being validated (as long as the secrets are the same).
# Once all conch clients have been migrated, this should be set to 1.
# After a month (the expiry time for conch cookies) all existing
# 'conch' cookie code should be removed
stop_conch_cookie_issue => 0,
},
# See all settings at https://metacpan.org/pod/Mojo::Server::Hypnotoad#SETTINGS
hypnotoad => {
listen => ['http://*:5000'],
# For docker, if a read_only container is desired, uncomment this and
# set /tmp to tmpfs
# pid_file => "/tmp/hypnotoad.pid",
# operates behind a reverse proxy
proxy => 1,
},
nytprof => {
# path to your nytprofhtml script (installed as part of Devel::NYTProf
# distribution). the plugin will do its best to try to find this so this
# is optional, just set if you have a none standard path
nytprofhtml_path => 'local/bin/nytprofhtml',
# path to store Devel::NYTProf output profiles and generated html pages.
# options, defaults to "/path/to/your/app/root/dir/nytprof"
profiles_dir => 'nytprof/',
# set this to true to allow the plugin to run when in production mode
# the default value is 0 so you can deploy your app to prod without
# having to make any changes to config/plugin register
allow_production => 1,
# Devel::NYTProf environment options, see the documentation at
# https://metacpan.org/pod/Devel::NYTProf#NYTPROF-ENVIRONMENT-VARIABLE
# for a complete list. N.B. you can't supply start or file as these
# are used internally in the plugin so will be ignored if passed
env => {
blocks => 1
},
# when to enable Devel::NYTProf profiling - the pre_hook will run
# to enable_profile and the post_hook will run to disable_profile
# and finish_profile. the values show here are the defaults so you
# do not need to provide these options
#
# bear in mind the caveats in the Mojolicious docs regarding hooks
# and that they may not fire in the order you expect - this can
# affect the NYTProf output and cause some things not to appear
# (or appear in the wrong order). the defaults below should be
# sufficient for profiling your code, however you can change these
#
# N.B. there is nothing stopping you reversing the order of the
# hooks, which would cause the Mojolicious framework code to be
# profiled, or providing hooks that are the same or even invalid. these
# config options should probably be used with some care
pre_hook => 'before_routes',
post_hook => 'around_dispatch',
},
logging => {
# directory where all logs will be placed.
# if not absolute, will be relative to the root of the application.
# dir => 'log', # default
# level => 'debug', # default
# bunyan => 1, # default
# with_trace => 0, # default; enabled when verbose => 1
# For docker, this should probably be set to 1. If not, logs will be
# written to /app/conch/log inside the container and a volume will need
# to be mounted there.
log_to_stderr => 0,
verbose => 0, # turns on logging of request and response bodies, and exception stack traces
},
}