-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpartyflow-config.sample.jkson
205 lines (183 loc) · 8.55 KB
/
partyflow-config.sample.jkson
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
/*
* Welcome to Partyflow! This is a Jankson file... sort of. Jankson is a modification of JSON
* that allows "quirks", such as:
* - unquoted keys (when unambiguous)
* - omitting commas
* - omitting the root object braces
* - comments
*
* Partyflow further extends Jankson with these quirks:
* - dashes and at-signs in keys
* - nest strings () for code without escaping quotes
* - shell arrays <> for compactly describing command-line argument arrays
* - objects without : delimiters
*
* Together, these new quirks make working with Partyflow configuration and data files
* much easier and more intuitive, even if at first they're weird and out-of-place.
*/
http {
bind: "0.0.0.0"
port: 3000
path: "/"
// Set to /dev/null (even on Windows) to suppress logging
accessLog: "./access.log"
// Should be left to true unless you're doing development and are changing templates
cacheTemplates: true
// The absolute public URL this instance is accessible at, excluding the root path
publicUrl: "http://localhost:3000"
// If true, Partyflow is running behind a trusted proxy and should parse X-Forwarded-For,
// Forwarded, etc.
trustProxy: false
}
logger {
// TRACE, DEBUG, INFO, WARN, or ERROR
level: "INFO"
// true to enable ANSI color support
color: true
}
database {
// Valid options are h2 and mariadb.
driver: "h2"
// An embedded pure Java database comparable to SQLite. Great for easy small deployments.
// No configuration required - works out of the box.
h2 {
// .mv.db suffix is added automatically - a .trace.db will also appear alongside
file: "./partyflow"
}
// A mature and fast external database server. Support is still experimental.
// MySQL should also work but is not supported.
mariadb {
host: "localhost"
port: 3306
user: "user"
pass: "p4ssw0rd!"
db: "partyflow"
}
}
security {
// Used to secure session cookies. Should be set to something long and random; if null, an
// appropriate value will be generated for you on run and stored in this file.
sessionSecret: null
// If true, some additional protections will be activated that rely on the site being served
// over HTTPS. (This has to be done at a reverse proxy; Partyflow itself does not support SSL.)
https: false
// Advanced tuning of the underlying password hashing algorithm. null uses
// built-in defaults and is recommended.
scrypt: null
// You can specify parameters like so:
//scrypt: {N: 18, r: 16, p: 1}
}
storage {
// Valid options are fs and s3.
driver: "fs"
// Stores files on your local filesystem.
fs {
// The directory to store files in.
dir: "./files"
}
// Stores files on any S3-compatible remote storage provider.
s3 {
// The endpoint of the service you use.
endpoint: "https://s3.wasabisys.com"
// The name of the bucket to store files in.
bucket: "partyflow-example"
// The access key ID, for authentication. Sometimes called "client id" or "username".
accessKeyId: "ACCESS_KEY_ID"
// The secret access key, for authentication. Sometimes called "client secret" or "password".
secretAccessKey: "SECRET_ACCESS_KEY"
}
// If this isn't an absolute URL, it will be resolved relative to http.path
// If this is an absolute path, it will be resolved relative to the domain
// {} will be replaced with the file path
// The default will serve files through Partyflow, which is inefficient when using remote hosting.
// In that case, you should set this to your bucket's URL, Cloudfront host, bunny.net pull zone, whatever.
// Note that you will need CORS headers for audio playback to function properly!
publicUrlPattern: "files/{}"
// For example, a direct Wasabi config would look like this:
//publicUrlPattern: "https://BUCKET_NAME.s3.wasabisys.com/{}"
// An ISO 8601 duration specifier (without the P prefix) describing the amount of time cached
// transcodes will be kept without any downloads before being deleted. The prune time is a tradeoff
// between storage utilization and CPU utilization for performing transcodes. On remote storage, you
// will probably want to turn this down somewhat low to keep costs down. However, on some providers
// (such as Wasabi) there is a minimum storage time, so deleting files before that time elapses is
// just wasting money. Setting this shorter than 1 minute isn't useful.
pruneTime: "7D"
// If you're using Wasabi, this matches their minimum storage time:
//pruneTime: "90D"
// For times less than a day, you need to prefix this with "T" to switch from date to time:
//pruneTime: "T5M"
}
programs {
// Using some form of sandboxing (e.g. unshare) is recommended in production. All files will be
// in /tmp/partyflow/work (or whatever your platform's default temp directory is)
// Used to process audio.
// {} will be replaced with "mpeg" or "probe" depending on which program is needed.
ffmpeg: <ff{} -hide_banner>
// Used to process images.
magickConvert: <convert>
// For newer versions of ImageMagick:
//magickConvert: <magick convert>
// This should be enabled if you're using QAAC in Wine - it greatly increases the speed of
// transcodes by keeping a wineserver instance ready with the correct wineprefix. Normally,
// the wineserver automatically exits after a few seconds of inactivity. The spawned
// wineserver will exit when Partyflow does.
runWineserver: false
wineserver: <env WINEPREFIX=/opt/qaac wineserver --persistent --foreground>
// The maximum number of FFmpeg processes that will be run simultaneously. If set to 0, uses
// the number of CPU threads.
maxTranscodes: 0
altcmds: {
// altcmds must accept WAV data from stdin and output audio in a format FFmpeg can understand
// to stdout. These are used to support codecs that FFmpeg doesn't have good support for.
// AAC encoders - not required for Partyflow to work. See "aacMode" in formats below
// for more info.
// Available in many distros. Just install it. You may need to enable a "contrib" repository,
// as FDK-AAC is open source but not free software.
fdkaac: <fdkaac>
// qaac requires proprietary non-redistributable Apple components, and as such, requires special
// installation. https://git.sleeping.town/unascribed/Partyflow/wiki/qaac-Installation
qaac: <env WINEPREFIX=/opt/qaac wine /opt/qaac/x86/qaac.exe>
}
}
formats {
// Specify the path to a formats.jkson to use custom file formats, or null to use the built-ins.
// This is an advanced feature and should be used with caution. If the given file does not exist,
// then the built-in format definitions will be written to it.
definitions: null
// If you only want to add new definitions, it's overkill to replace the whole formats file. A file
// specified here will have its formats merged with the builtins (or the above definitions file).
additionalDefinitions: null
// If true, uncompressed formats such as WAV and AIFF will be offered. These are a waste of
// bandwidth - FLAC is a better choice, but people often expect WAV to be an option. To avoid
// wasting storage space, WAV and AIFF formats are streamed directly to the client from the FLAC
// masters.
allowUncompressedFormats: false
// If true, lossless formats such as ALAC and FLAC will be offered.
allowLosslessFormats: true
// If true, MP3 downloads will be offered. MP3 is the most popular audio format and people usually
// expect its presence. Does not affect streaming formats; ~128kbps MP3 will always be offered.
allowMP3: true
// If true, proprietary patent-encumbered formats such as AAC will be offered.
// This option can be DANGEROUS and if you're sufficiently large may result in the MPEG-LA trying
// to seek rent from you for daring to use their bad formats. Only turn on if you really need
// it and are willing to accept this risk. See below for supported AAC encoders - the AAC encoder
// built-in to FFmpeg is unacceptable quality and not supported.
allowEncumberedFormats: false
// If true, then MP3 formats will be recommended. People generally expect to see MP3 files, as it's
// the most popular format. If you want to discourage their usage without outright disabling them,
// then you can turn this off.
recommendMP3: true
// Possible values:
// - none: Do not offer AAC (recommended)
// - fdkaac: Use the fdkaac command-line tool (easiest)
// - qaac: Use qaac with Apple's CoreAudio in Wine (hardest, best quality)
// - ffmpeg-fdk: Use libfdk_aac in ffmpeg (requires a custom build)
aacMode: "none"
}
custom {
// If you're writing your own formats file, then you can put extra config options here for usage by
// your JEXL expressions. Adding new options to the other sections (except altcmds) won't work.
}
// kate: hl c
// vi: set ft=c
// -*- mode: c -*-