blob: bf443de5a01aa1922819a58a97908f6e19fcdad3 (
plain)
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
|
{{template "base/head" .}}
<div id="body" class="container">
<form action="/install" method="post" class="form-horizontal card" id="install-card">
{{.CsrfTokenHtml}}
<h3>Install Steps For First-time Run</h3>
{{template "base/alert" .}}
<p class="help-block text-center">Gogs requires MySQL, SQLite3. or PostgreSQL. SQLite3 is only available in the official binary version.</p>
<div class="form-group">
<label class="col-md-3 control-label">Database Type: </label>
<div class="col-md-8">
<select name="database" id="install-database" class="form-control">
{{if .CurDbOption}}<option value="{{.CurDbOption}}">{{.CurDbOption}}</option>{{end}}
{{range .DbOptions}}
{{if not (eq $.CurDbOption .)}}<option value="{{.}}" >{{.}}</option>{{end}}
{{end}}
</select>
</div>
</div>
<div class="server-sql {{if eq .CurDbOption "SQLite3"}}hide{{end}}">
<div class="form-group">
<label class="col-md-3 control-label">Host: </label>
<div class="col-md-8">
<input name="host" id="database-host" class="form-control" placeholder="Type database server host" value="{{.host}}">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">User: </label>
<div class="col-md-8">
<input name="user" class="form-control" placeholder="Type database username" value="{{.user}}">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Password: </label>
<div class="col-md-8">
<input name="passwd" type="password" class="form-control" placeholder="Type database password" value="{{.passwd}}">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Database Name: </label>
<div class="col-md-8">
<input name="database_name" type="text" class="form-control" placeholder="Type mysql database name" value="{{.database_name}}">
<p class="help-block">Recommend use INNODB engine with utf8_general_ci charset.</p>
</div>
</div>
<div class="form-group pgsql-setting {{if not (eq .CurDbOption "PostgreSQL")}}hide{{end}}">
<label class="col-md-3 control-label">SSL Mode: </label>
<div class="col-md-8">
<select name="ssl_mode" class="form-control">
<option value="disable">Disable</option>
<option value="require">Require</option>
<option value="verify-full">Verify Full</option>
</select>
</div>
</div>
</div>
<div class="sqlite-setting {{if not (eq .CurDbOption "SQLite3")}}hide{{end}}">
<div class="form-group">
<label class="col-md-3 control-label">Path: </label>
<div class="col-md-8">
<input name="database_path" class="form-control" placeholder="Type sqlite3 file path" value="{{.database_path}}">
<p class="help-block">The file path of SQLite3 database.</p>
</div>
</div>
</div>
<hr/>
<p class="help-block text-center">General Settings of Gogs</p>
<div class="form-group">
<label class="col-md-3 control-label">Repository Path: </label>
<div class="col-md-8">
<input name="repo_path" type="text" class="form-control" placeholder="Type your repository directory" value="{{.repo_path}}" required="required">
<p class="help-block">The git copy of each repository is saved in this directory.</p>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Run User: </label>
<div class="col-md-8">
<input name="run_user" type="text" class="form-control" placeholder="Type system user name" value="{{.run_user}}" required="required">
<p class="help-block">The user has access to visit and run Gogs.</p>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Domain: </label>
<div class="col-md-8">
<input name="domain" type="text" class="form-control" placeholder="Type your domain name" value="{{.domain}}" required="required">
<p class="help-block">This affects SSH clone URL.</p>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">App URL: </label>
<div class="col-md-8">
<input name="app_url" type="text" class="form-control" placeholder="Type app root URL" value="{{.app_url}}" required="required">
<p class="help-block">This affects HTTP/HTTPS clone URL and somewhere in e-mail.</p>
</div>
</div>
<hr/>
<p class="help-block text-center">Admin Account Settings</p>
<div class="form-group {{if .Err_AdminName}}has-error has-feedback{{end}}">
<label class="col-md-3 control-label">Username: </label>
<div class="col-md-8">
<input name="admin_name" type="text" class="form-control" placeholder="Type admin user name" value="{{.admin_name}}" required="required">
</div>
</div>
<div class="form-group {{if .Err_AdminPasswd}}has-error has-feedback{{end}}">
<label class="col-md-3 control-label">Password: </label>
<div class="col-md-8">
<input name="admin_pwd" type="password" class="form-control" placeholder="Type admin user password" value="{{.admin_pwd}}" required="required">
</div>
</div>
<div class="form-group {{if .Err_AdminEmail}}has-error has-feedback{{end}}">
<label class="col-md-3 control-label">E-mail: </label>
<div class="col-md-8">
<input name="admin_email" type="text" class="form-control" placeholder="Type admin user e-mail" value="{{.admin_email}}" required="required">
</div>
</div>
<hr/>
<div class="form-group text-center">
<button class="btn btn-danger btn-lg">Install Gogs</button>
<button class="btn btn-default btn-sm" type="button" data-toggle="modal" data-target="#advance-options-modal">
Advanced Options
</button>
</div>
<div class="modal fade" id="advance-options-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header"><h4 class="modal-title">Advanced Options</h4></div>
<div class="modal-body">
<p class="help-block text-center">Email Service Settings</p>
<div class="form-group">
<label class="col-md-3 control-label">SMTP Host: </label>
<div class="col-md-8">
<input name="smtp_host" type="text" class="form-control" placeholder="Type SMTP host address and port" value="{{.smtp_host}}">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Username: </label>
<div class="col-md-8">
<input name="mailer_user" type="text" class="form-control" placeholder="Type SMTP user e-mail address" value="{{.mailer_user}}">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Password: </label>
<div class="col-md-8">
<input name="mailer_pwd" type="password" class="form-control" placeholder="Type SMTP user password" value="{{.mailer_pwd}}">
</div>
</div>
<hr/>
<p class="text-center help-block">Notification Settings</p>
<div class="form-group">
<div class="col-md-offset-3 col-md-7">
<div class="checkbox">
<label>
<input name="register_confirm" type="checkbox" {{if .register_confirm}}checked{{end}}>
<strong>Enable Register Confirmation</strong>
</label>
</div>
<div class="checkbox">
<label>
<input name="mail_notify" type="checkbox" {{if .mail_notify}}checked{{end}}>
<strong>Enable Mail Notification</strong>
</label>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal">Confirm</button>
</div>
</div>
</div>
</div>
</form>
</div>
{{template "base/footer" .}}
|