-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgosh.yml
86 lines (72 loc) · 2.99 KB
/
gosh.yml
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
---
# user and group will be the system user and group to drop permissions to.
user: "_gosh"
group: "_gosh"
# The store section describes the storage server's configuration.
store:
path: "./store"
# id_generator specifies how the ID resp. name of new elements is generated.
id_generator:
# type specifies which generator to use:
# - "random" which generates a base58-encoded string of $length bytes.
# - "wordlist" picks $length words from $file where $file should contain
# one word per line.
type: "random"
# length is the ID length.
# - For the "random" type, this is the byte length, resulting in
# 2^($length * 8) possible combinations.
# - For the "wordlist" type, this is the amount of words, resulting in
# $wordlist_length^$length possible combinations.
length: 8
# file is used as the source for type "wordlist".
# file: "/usr/share/dict/words"
# The webserver section describes the web server's configuration.
#
# The web server will be bound to some socket (TCP or Unix) and starts listening
# for either HTTP or FastCGI requests.
webserver:
# listen defines on which protocol ("tcp" or "unix") the listener should be
# bound to. The value must either be a tuple of an IP address and a port or a
# file system path for the Unix domain socket. Please make sure that
# listen_protocol matches.
listen:
protocol: "tcp"
bound: ":8080"
# protocol: "unix"
# bound: "/var/www/run/gosh.sock"
# unix_socket's chmod, owner, and group are setting the file system
# permissions for the socket if listen_protocol is "unix".
unix_socket:
chmod: "0600"
owner: "www"
group: "www"
# protocol defines the application level protocol the web server should speak.
# It should be either "http", for an HTTP server, or "fcgi", for FastCGI.
protocol: "http"
# url_prefix is an optional prefix in URL to be used, e.g., "/gosh"
url_prefix: ""
# custom_index will be used instead of the compiled in index.html template.
# For starters, copy the index.html from the repository somewhere nice.
custom_index: "/path/to/alternative/index.html"
# static_files to be read during startup and returned instead of being passed
# against the store's database. This might be used for custom resources.
static_files:
"/favicon.ico":
path: "/path/to/favicon.ico"
mime: "image/vnd.microsoft.icon"
"/custom.css":
path: "/path/to/custom.css"
mime: "text/css"
# item_config sets restrictions for new items, e.g., their max_size, in bytes
# or suffixed with a unit, and max_lifetime, as a Go duration. Furthermore,
# some MIME types might be dropped by mime_drop or rewritten with mime_map.
item_config:
max_size: "10MiB"
max_lifetime: "24h"
mime_drop:
- "application/vnd.microsoft.portable-executable"
- "application/x-msdownload"
mime_map:
"text/html": "text/plain"
# contact should be an email address to be publicly displayed for abuses.
contact: "[email protected]"