0 |
############################################################################### |
1 |
### Reference configuration file for the Smederee hub service. ### |
2 |
############################################################################### |
3 |
|
4 |
hub { |
5 |
# Configuration of the database. |
6 |
# Defaults are given except for password and can also be overridden via |
7 |
# environment variables. |
8 |
database { |
9 |
# The class name of the JDBC driver to be used. |
10 |
driver = "org.postgresql.Driver" |
11 |
driver = ${?SMEDEREE_HUB_DB_DRIVER} |
12 |
# The JDBC connection URL **without** username and password. |
13 |
url = "jdbc:postgresql://localhost:5432/smederee" |
14 |
url = ${?SMEDEREE_HUB_DB_URL} |
15 |
# The username (login) needed to authenticate against the database. |
16 |
user = "smederee_hub" |
17 |
user = ${?SMEDEREE_HUB_DB_USER} |
18 |
# The password needed to authenticate against the database. |
19 |
pass = "secret" |
20 |
pass = ${?SMEDEREE_HUB_DB_PASS} |
21 |
} |
22 |
|
23 |
# The general service configuration. |
24 |
# Settings which toggle something on or off are booleans (true / false). |
25 |
service { |
26 |
# The hostname on which the service shall listen for requests. |
27 |
host = "localhost" |
28 |
# The TCP port number on which the service shall listen for requests. |
29 |
port = 8080 |
30 |
# A directory into which files are written that are supposed to be downloaded by users (e.g. distribution |
31 |
# files of repositories). |
32 |
download-directory = /var/tmp/smederee/download |
33 |
download-directory = ${?SMEDEREE_DOWNLOAD_DIR} |
34 |
# A file which contains the key used to build the CSRF protection. |
35 |
# If it does not exist then it should be created with sensible permissions. |
36 |
csrf-key-file = /var/tmp/smederee/csrf-key.bin |
37 |
csrf-key-file = ${?SMEDEREE_CSRF_KEY_FILE} |
38 |
# The maximum allowed size of a file in bytes to be displayed / rendered via the web interface. |
39 |
render-maximum-file-size = 131072 |
40 |
|
41 |
# Settings affecting how the service will communicate several information to |
42 |
# the "outside world" e.g. if it runs behind a reverse proxy. |
43 |
external { |
44 |
# The official hostname of the service which will be used for the CSRF |
45 |
# protection, generation of links in e-mails etc. |
46 |
host = ${hub.service.host} |
47 |
|
48 |
# A possible path prefix that will be prepended to any paths used in link |
49 |
# generation. If no path prefix is used then you MUST either comment it out |
50 |
# or set it to `path = null`! |
51 |
#path = null |
52 |
|
53 |
# The port number which defaults to the port the service is listening on. |
54 |
# Please note that this is also relevant for CSRF protection! |
55 |
# If the service is running behind a reverse proxy on a standard port e.g. |
56 |
# 80 or 443 (http or https) then you MUST set this either to `port = null` |
57 |
# or comment it out! |
58 |
port = ${hub.service.port} |
59 |
|
60 |
# The URL scheme which is used for links and will also determine if cookies |
61 |
# will have the secure flag enabled. |
62 |
# Valid options are: |
63 |
# - http |
64 |
# - https |
65 |
scheme = "http" |
66 |
} |
67 |
|
68 |
# Authentication / login settings |
69 |
authentication { |
70 |
enabled = true |
71 |
|
72 |
# The secret used for the cookie encryption and validation. |
73 |
# Using the default should produce a warning message on startup. |
74 |
cookie-secret = "CHANGEME" |
75 |
|
76 |
# Determines after how many failed login attempts an account gets locked. |
77 |
lock-after = 10 |
78 |
|
79 |
# Timeouts for the authentication session. |
80 |
timeouts { |
81 |
# The maximum allowed age an authentication session. This setting will |
82 |
# affect the invalidation of a session on the server side. |
83 |
# This timeout MUST be triggered regardless of session activity. |
84 |
absolute-timeout = 3 days |
85 |
|
86 |
# This timeout defines how long after the last activity a session will |
87 |
# remain valid. |
88 |
idle-timeout = 30 minutes |
89 |
|
90 |
# The time after which a session will be renewed (a new session ID will be |
91 |
# generated). |
92 |
renewal-timeout = 20 minutes |
93 |
} |
94 |
} |
95 |
|
96 |
# Billing / payment related settings |
97 |
billing { |
98 |
enabled = false |
99 |
|
100 |
# Settings for the Stripe API used for billing. |
101 |
stripe { |
102 |
api-key = ${?STRIPE_API_KEY} |
103 |
secret-key = ${?STRIPE_SECRET_KEY} |
104 |
} |
105 |
} |
106 |
|
107 |
# Configuration for the darcs module for vcs related operations via darcs. |
108 |
darcs { |
109 |
# The directory used to store the actual repositories structured after owner. |
110 |
# ``` |
111 |
# repositories-directory |
112 |
# \_ user1 |
113 |
# \_ repo1 |
114 |
# \_ repo2 |
115 |
# \_ user2 |
116 |
# \_ repo1 |
117 |
# ``` |
118 |
repositories-directory = /srv/smederee/darcs |
119 |
repositories-directory = ${?SMEDEREE_DARCS_REPOS_DIR} |
120 |
# The path to the darcs binary executable. If not a full path (i.e. just |
121 |
# `darcs`) it must be present on the `$PATH` of the environment under which |
122 |
# the server is running. |
123 |
executable = "darcs" |
124 |
executable = ${?SMEDEREE_DARCS_EXECUTABLE} |
125 |
} |
126 |
|
127 |
# The email middleware configuration for sending email messages. |
128 |
email { |
129 |
# The hostname of the email server (SMTP) to connect to. |
130 |
host = "localhost" |
131 |
host = ${?EMAIL_HOST} |
132 |
# The port number to be used for the connection. |
133 |
# This is usually 25 for local sendmail connections and 465 for SMTPS or 587 SMTP_TLS connections. |
134 |
port = 25 |
135 |
port = ${?EMAIL_PORT} |
136 |
# Specify the transport method (security) to be used for the connection (should either be SMTPS or TLS). |
137 |
transport = "PLAIN" |
138 |
transport = ${?EMAIL_TRANSPORT} |
139 |
# An optional username if authentication is required. |
140 |
username = ${?EMAIL_USERNAME} |
141 |
# An optional password if authentication is required. |
142 |
password = ${?EMAIL_PASSWORD} |
143 |
} |
144 |
|
145 |
# SSH server component settings |
146 |
ssh { |
147 |
enabled = false |
148 |
# A username for generic access to services for darcs clone, pull and push |
149 |
# (e.g. `darcs pull genericUser@smederee-domain:accountName/repository`). |
150 |
generic-user = "darcs" |
151 |
# The hostname/address the SSH server will bind to. |
152 |
host = "localhost" |
153 |
host = ${?SSH_SERVER_HOST} |
154 |
# The port number on which the SSH server will listen. |
155 |
port = 30983 |
156 |
port = ${?SSH_SERVER_PORT} |
157 |
# A path to the file from which the server key is loaded and also written to if it needs to be generated. |
158 |
# This file should only be accessible for the user account that runs the smederee service. |
159 |
server-key-file = /var/db/smederee/server.key |
160 |
server-key-file = ${?SSH_SERVER_KEY} |
161 |
} |
162 |
|
163 |
# Settings regarding the computation of statistics for repositories. |
164 |
statistics { |
165 |
# The path to the tokei binary executable. If not a full path (i.e. just |
166 |
# `tokei`) it must be present on the `$PATH` of the environment under which |
167 |
# the server is running. |
168 |
# If tokei is not available then you MUST either comment it out or set it |
169 |
# to `tokei = null`! |
170 |
tokei = null |
171 |
tokei = ${?SMEDEREE_TOKEI_EXECUTABLE} |
172 |
} |
173 |
|
174 |
# Signup / registration related settings. |
175 |
signup { |
176 |
enabled = true |
177 |
} |
178 |
|
179 |
# Configuration regarding the integration with the ticket service. |
180 |
ticket-integration { |
181 |
enabled = false |
182 |
# The base URI used to build links to the ticket service. |
183 |
base-uri = "http://localhost:8080" |
184 |
base-uri = ${?SMEDEREE_TICKET_BASE_URI} |
185 |
} |
186 |
} |
187 |
} |
188 |
|
189 |
tickets { |
190 |
# Configuration of the database. |
191 |
# Defaults are given except for password and can also be overridden via |
192 |
# environment variables. |
193 |
database { |
194 |
# The class name of the JDBC driver to be used. |
195 |
driver = "org.postgresql.Driver" |
196 |
driver = ${?SMEDEREE_TICKETS_DB_DRIVER} |
197 |
# The JDBC connection URL **without** username and password. |
198 |
url = "jdbc:postgresql://localhost:5432/smederee" |
199 |
url = ${?SMEDEREE_TICKETS_DB_URL} |
200 |
# The username (login) needed to authenticate against the database. |
201 |
user = "smederee_tickets" |
202 |
user = ${?SMEDEREE_TICKETS_DB_USER} |
203 |
# The password needed to authenticate against the database. |
204 |
pass = "secret" |
205 |
pass = ${?SMEDEREE_TICKETS_DB_PASS} |
206 |
} |
207 |
|
208 |
# Settings affecting how the service will communicate several information to |
209 |
# the "outside world" e.g. if it runs behind a reverse proxy. |
210 |
external = ${hub.service.external} |
211 |
|
212 |
# Configuration regarding the integration with the hub service. |
213 |
hub-integration { |
214 |
# The base URI used to build links to the hub service. |
215 |
base-uri = "http://localhost:8080" |
216 |
base-uri = ${?SMEDEREE_HUB_BASE_URI} |
217 |
} |
218 |
} |