· 9 years ago · Jul 21, 2016, 08:09 PM
1# NEVER EVER MODIFY THIS FILE
2# PLEASE MAKE CHANGES ON CORRESPONDING CUSTOM CONFIG FILE
3
4; App name that shows on every page title
5APP_NAME = Gogs: Go Git Service
6; Change it if you run locally
7RUN_USER = git
8; Either "dev", "prod" or "test", default is "dev"
9RUN_MODE = dev
10
11[repository]
12ROOT =
13SCRIPT_TYPE = bash
14; Default ANSI charset
15ANSI_CHARSET =
16; Force every new repository to be private
17FORCE_PRIVATE = false
18; Global maximum creation limit of repository per user, -1 means no limit
19MAX_CREATION_LIMIT = -1
20; Patch test queue length, make it as large as possible
21PULL_REQUEST_QUEUE_LENGTH = 10000
22
23[ui]
24; Number of repositories that are showed in one explore page
25EXPLORE_PAGING_NUM = 20
26; Number of issues that are showed in one page
27ISSUE_PAGING_NUM = 10
28; Number of maximum commits showed in one activity feed
29FEED_MAX_COMMIT_NUM = 5
30; Value of `theme-color` meta tag, used by Android >= 5.0
31; An invalid color like "none" or "disable" will have the default style
32; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
33THEME_COLOR_META_TAG = `#ff5343`
34
35[ui.admin]
36; Number of users that are showed in one page
37USER_PAGING_NUM = 50
38; Number of repos that are showed in one page
39REPO_PAGING_NUM = 50
40; Number of notices that are showed in one page
41NOTICE_PAGING_NUM = 25
42; Number of organization that are showed in one page
43ORG_PAGING_NUM = 50
44
45[markdown]
46; Enable hard line break extension
47ENABLE_HARD_LINE_BREAK = false
48; List of custom URL-Schemes that are allowed as links when rendering Markdown
49; for example git,magnet
50CUSTOM_URL_SCHEMES =
51
52[server]
53PROTOCOL = http
54DOMAIN = localhost
55ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
56HTTP_ADDR =
57HTTP_PORT = 3000
58; Local (DMZ) URL for Gogs workers (such as SSH update) accessing web service.
59; In most cases you do not need to change the default value.
60; Alter it only if your SSH server node is not the same as HTTP node.
61LOCAL_ROOT_URL = http://localhost:%(HTTP_PORT)s/
62; Disable SSH feature when not available
63DISABLE_SSH = false
64; Whether use builtin SSH server or not.
65START_SSH_SERVER = false
66; Domain name to be exposed in clone URL
67SSH_DOMAIN = %(DOMAIN)s
68; Port number to be exposed in clone URL
69SSH_PORT = 22
70; Port number builtin SSH server listens on
71SSH_LISTEN_PORT = %(SSH_PORT)s
72; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
73SSH_ROOT_PATH =
74; Directory to create temporary files when test publick key using ssh-keygen,
75; default is system temporary directory.
76SSH_KEY_TEST_PATH =
77; Path to ssh-keygen, default is 'ssh-keygen' and let shell find out which one to call.
78SSH_KEYGEN_PATH = ssh-keygen
79; Indicate whether to check minimum key size with corresponding type
80MINIMUM_KEY_SIZE_CHECK = false
81; Disable CDN even in "prod" mode
82OFFLINE_MODE = false
83DISABLE_ROUTER_LOG = false
84; Generate steps:
85; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
86;
87; Or from a .pfx file exported from the Windows certificate store (do
88; not forget to export the private key):
89; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
90; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
91CERT_FILE = custom/https/cert.pem
92KEY_FILE = custom/https/key.pem
93; Upper level of template and static file path
94; default is the path where Gogs is executed
95STATIC_ROOT_PATH =
96; Default path for App data
97APP_DATA_PATH = data
98; Application level GZIP support
99ENABLE_GZIP = false
100; Landing page for non-logged users, can be "home" or "explore"
101LANDING_PAGE = home
102
103; Define allowed algorithms and their minimum key length (use -1 to disable a type)
104[ssh.minimum_key_sizes]
105ED25519 = 256
106ECDSA = 256
107RSA = 2048
108DSA = 1024
109
110[database]
111; Either "mysql", "postgres" or "sqlite3", it's your choice
112DB_TYPE = mysql
113HOST = 127.0.0.1:3306
114NAME = gogs
115USER = root
116PASSWD =
117; For "postgres" only, either "disable", "require" or "verify-full"
118SSL_MODE = disable
119; For "sqlite3" and "tidb", use absolute path when you start as service
120PATH = data/gogs.db
121
122[admin]
123
124[security]
125INSTALL_LOCK = false
126; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
127SECRET_KEY = !#@FDEWREWR&*(
128; Auto-login remember days
129LOGIN_REMEMBER_DAYS = 7
130COOKIE_USERNAME = gogs_awesome
131COOKIE_REMEMBER_NAME = gogs_incredible
132; Reverse proxy authentication header name of user name
133REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
134
135[service]
136ACTIVE_CODE_LIVE_MINUTES = 180
137RESET_PASSWD_CODE_LIVE_MINUTES = 180
138; User need to confirm e-mail for registration
139REGISTER_EMAIL_CONFIRM = false
140; Does not allow register and admin create account only
141DISABLE_REGISTRATION = false
142; User must sign in to view anything.
143REQUIRE_SIGNIN_VIEW = false
144; Mail notification
145ENABLE_NOTIFY_MAIL = false
146; More detail: https://github.com/gogits/gogs/issues/165
147ENABLE_REVERSE_PROXY_AUTHENTICATION = false
148ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
149; Enable captcha validation for registration
150ENABLE_CAPTCHA = true
151
152[webhook]
153; Hook task queue length
154QUEUE_LENGTH = 1000
155; Deliver timeout in seconds
156DELIVER_TIMEOUT = 5
157; Allow insecure certification
158SKIP_TLS_VERIFY = false
159; Number of history information in each page
160PAGING_NUM = 10
161
162[mailer]
163ENABLED = false
164; Buffer length of channel, keep it as it is if you don't know what it is.
165SEND_BUFFER_LEN = 100
166; Name displayed in mail title
167SUBJECT = %(APP_NAME)s
168; Mail server
169; Gmail: smtp.gmail.com:587
170; QQ: smtp.qq.com:25
171; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used.
172HOST =
173; Disable HELO operation when hostname are different.
174DISABLE_HELO =
175; Custom hostname for HELO operation, default is from system.
176HELO_HOSTNAME =
177; Do not verify the certificate of the server. Only use this for self-signed certificates
178SKIP_VERIFY =
179; Use client certificate
180USE_CERTIFICATE = false
181CERT_FILE = custom/mailer/cert.pem
182KEY_FILE = custom/mailer/key.pem
183; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
184FROM =
185; Mailer user name and password
186USER =
187PASSWD =
188
189[cache]
190; Either "memory", "redis", or "memcache", default is "memory"
191ADAPTER = memory
192; For "memory" only, GC interval in seconds, default is 60
193INTERVAL = 60
194; For "redis" and "memcache", connection host address
195; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
196; memcache: `127.0.0.1:11211`
197HOST =
198
199[session]
200; Either "memory", "file", "redis" or "mysql", default is "memory"
201PROVIDER = memory
202; Provider config options
203; memory: not have any config yet
204; file: session file path, e.g. `data/sessions`
205; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
206; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
207PROVIDER_CONFIG = data/sessions
208; Session cookie name
209COOKIE_NAME = i_like_gogits
210; If you use session in https only, default is false
211COOKIE_SECURE = false
212; Enable set cookie, default is true
213ENABLE_SET_COOKIE = true
214; Session GC time interval, default is 86400
215GC_INTERVAL_TIME = 86400
216; Session life time, default is 86400
217SESSION_LIFE_TIME = 86400
218
219[picture]
220AVATAR_UPLOAD_PATH = data/avatars
221; Chinese users can choose "duoshuo"
222; or a custom avatar source, like: http://cn.gravatar.com/avatar/
223GRAVATAR_SOURCE = gravatar
224DISABLE_GRAVATAR = false
225
226[attachment]
227; Whether attachments are enabled. Defaults to `true`
228ENABLE = true
229; Path for attachments. Defaults to `data/attachments`
230PATH = data/attachments
231; One or more allowed types, e.g. image/jpeg|image/png
232ALLOWED_TYPES = image/jpeg|image/png
233; Max size of each file. Defaults to 32MB
234MAX_SIZE = 4
235; Max number of files per upload. Defaults to 10
236MAX_FILES = 5
237
238[time]
239; Specifies the format for fully outputed dates. Defaults to RFC1123
240; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
241; For more information about the format see http://golang.org/pkg/time/#pkg-constants
242FORMAT =
243
244[log]
245ROOT_PATH =
246; Either "console", "file", "conn", "smtp" or "database", default is "console"
247; Use comma to separate multiple modes, e.g. "console, file"
248MODE = console
249; Buffer length of channel, keep it as it is if you don't know what it is.
250BUFFER_LEN = 10000
251; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
252LEVEL = Trace
253
254; For "console" mode only
255[log.console]
256LEVEL =
257
258; For "file" mode only
259[log.file]
260LEVEL =
261; This enables automated log rotate(switch of following options), default is true
262LOG_ROTATE = true
263; Max line number of single file, default is 1000000
264MAX_LINES = 1000000
265; Max size shift of single file, default is 28 means 1 << 28, 256MB
266MAX_SIZE_SHIFT = 28
267; Segment log daily, default is true
268DAILY_ROTATE = true
269; Expired days of log file(delete after max days), default is 7
270MAX_DAYS = 7
271
272; For "conn" mode only
273[log.conn]
274LEVEL =
275; Reconnect host for every single message, default is false
276RECONNECT_ON_MSG = false
277; Try to reconnect when connection is lost, default is false
278RECONNECT = false
279; Either "tcp", "unix" or "udp", default is "tcp"
280PROTOCOL = tcp
281; Host address
282ADDR =
283
284; For "smtp" mode only
285[log.smtp]
286LEVEL =
287; Name displayed in mail title, default is "Diagnostic message from server"
288SUBJECT = Diagnostic message from server
289; Mail server
290HOST =
291; Mailer user name and password
292USER =
293PASSWD =
294; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
295RECEIVERS =
296
297; For "database" mode only
298[log.database]
299LEVEL =
300; Either "mysql" or "postgres"
301DRIVER =
302; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
303CONN =
304
305[cron]
306; Enable running cron tasks periodically.
307ENABLED = true
308; Run cron tasks when Gogs starts.
309RUN_AT_START = false
310
311; Update mirrors
312[cron.update_mirrors]
313SCHEDULE = @every 1h
314
315; Repository health check
316[cron.repo_health_check]
317SCHEDULE = @every 24h
318TIMEOUT = 60s
319; Arguments for command 'git fsck', e.g. "--unreachable --tags"
320; see more on http://git-scm.com/docs/git-fsck/1.7.5
321ARGS =
322
323; Check repository statistics
324[cron.check_repo_stats]
325RUN_AT_START = true
326SCHEDULE = @every 24h
327
328[git]
329MAX_GIT_DIFF_LINES = 10000
330; Arguments for command 'git gc', e.g. "--aggressive --auto"
331; see more on http://git-scm.com/docs/git-gc/1.7.5
332GC_ARGS =
333
334; Operation timeout in seconds
335[git.timeout]
336MIGRATE = 600
337MIRROR = 300
338CLONE = 300
339PULL = 300
340
341[i18n]
342LANGS = en-US,zh-CN,zh-HK,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI
343NAMES = English,ç®€ä½“ä¸æ–‡,ç¹é«”䏿–‡,Deutsch,Français,Nederlands,LatvieÅ¡u,РуÑÑкий,日本語,Español,Português do Brasil,Polski,българÑки,Italiano,Suomalainen
344
345; Used for datetimepicker
346[i18n.datelang]
347en-US = en
348zh-CN = zh
349zh-HK = zh-TW
350de-DE = de
351fr-FR = fr
352nl-NL = nl
353lv-LV = lv
354ru-RU = ru
355ja-JP = ja
356es-ES = es
357pt-BR = pt-BR
358pl-PL = pl
359bg-BG = bg
360it-IT = it
361fi-FI = fi
362
363; Extension mapping to highlight class
364; e.g. .toml=ini
365[highlight.mapping]
366
367[other]
368SHOW_FOOTER_BRANDING = false
369; Show version information about gogs and go in the footer
370SHOW_FOOTER_VERSION = true