2014-03-25 17:51:42 +09:00
|
|
|
{{template "base/head" .}}
|
2014-03-25 19:44:37 +09:00
|
|
|
<div id="body" class="container">
|
|
|
|
<form action="/install" method="post" class="form-horizontal card" id="install-card">
|
2014-03-25 17:51:42 +09:00
|
|
|
{{.CsrfTokenHtml}}
|
2014-03-28 05:31:32 +09:00
|
|
|
<h3>Install Steps For First-time Run</h3>
|
2014-04-11 03:37:43 +09:00
|
|
|
{{template "base/alert" .}}
|
2014-04-20 15:54:26 +09:00
|
|
|
<p class="help-block text-center">Gogs requires MySQL, SQLite3. or PostgreSQL. SQLite3 is only available in the official binary version.</p>
|
2014-03-27 21:39:18 +09:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-md-3 control-label">Database Type: </label>
|
2014-03-25 17:51:42 +09:00
|
|
|
<div class="col-md-8">
|
2014-03-27 21:39:18 +09:00
|
|
|
<select name="database" id="install-database" class="form-control">
|
2014-04-27 13:34:48 +09:00
|
|
|
{{if .CurDbValue}}<option value="{{.CurDbValue}}">{{.CurDbValue}}</option>{{end}}
|
|
|
|
{{range .DbOptions}}
|
|
|
|
{{if not (eq $.CurDbValue .)}}<option value="{{.}}">{{.}}</option>{{end}}
|
|
|
|
{{end}}
|
2014-03-27 21:39:18 +09:00
|
|
|
</select>
|
2014-03-25 17:51:42 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-30 06:50:51 +09:00
|
|
|
|
2014-04-27 13:34:48 +09:00
|
|
|
<div class="server-sql {{if eq .CurDbValue "SQLite3"}}hide{{end}}">
|
2014-03-27 21:39:18 +09:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-md-3 control-label">Host: </label>
|
|
|
|
<div class="col-md-8">
|
2014-04-30 05:35:25 +09:00
|
|
|
<input name="host" id="database-host" class="form-control" placeholder="Type database server host" value="{{.host}}">
|
2014-03-27 21:39:18 +09:00
|
|
|
</div>
|
2014-03-25 17:51:42 +09:00
|
|
|
</div>
|
2014-03-30 06:50:51 +09:00
|
|
|
|
2014-03-27 21:39:18 +09:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-md-3 control-label">User: </label>
|
|
|
|
|
|
|
|
<div class="col-md-8">
|
2014-03-30 22:39:44 +09:00
|
|
|
<input name="user" class="form-control" placeholder="Type database username" value="{{.user}}">
|
2014-03-27 21:39:18 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-30 06:50:51 +09:00
|
|
|
|
2014-03-27 21:39:18 +09:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-md-3 control-label">Password: </label>
|
|
|
|
|
|
|
|
<div class="col-md-8">
|
2014-03-30 22:39:44 +09:00
|
|
|
<input name="passwd" type="password" class="form-control" placeholder="Type database password" value="{{.passwd}}">
|
2014-03-27 21:39:18 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-28 05:31:32 +09:00
|
|
|
|
2014-03-27 21:39:18 +09:00
|
|
|
<div class="form-group">
|
2014-03-28 05:31:32 +09:00
|
|
|
<label class="col-md-3 control-label">Database Name: </label>
|
2014-03-27 21:39:18 +09:00
|
|
|
|
|
|
|
<div class="col-md-8">
|
2014-03-30 22:39:44 +09:00
|
|
|
<input name="database_name" type="text" class="form-control" placeholder="Type mysql database name" value="{{.database_name}}">
|
2014-03-27 21:39:18 +09:00
|
|
|
<p class="help-block">Recommend use INNODB engine with utf8_general_ci charset.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-28 05:31:32 +09:00
|
|
|
|
2014-04-27 13:34:48 +09:00
|
|
|
<div class="form-group pgsql-setting {{if not (eq .CurDbValue "PostgreSQL")}}hide{{end}}">
|
2014-03-28 05:31:32 +09:00
|
|
|
<label class="col-md-3 control-label">SSL Mode: </label>
|
2014-03-27 21:39:18 +09:00
|
|
|
<div class="col-md-8">
|
2014-03-28 05:31:32 +09:00
|
|
|
<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>
|
2014-03-27 21:39:18 +09:00
|
|
|
</div>
|
2014-03-25 17:51:42 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-30 06:50:51 +09:00
|
|
|
|
2014-04-27 13:34:48 +09:00
|
|
|
<div class="sqlite-setting {{if not (eq .CurDbValue "SQLite3")}}hide{{end}}">
|
2014-03-27 21:39:18 +09:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-md-3 control-label">Path: </label>
|
|
|
|
|
|
|
|
<div class="col-md-8">
|
2014-03-30 06:50:51 +09:00
|
|
|
<input name="database_path" class="form-control" placeholder="Type sqlite3 file path" value="{{.database_path}}">
|
2014-03-28 20:26:22 +09:00
|
|
|
<p class="help-block">The file path of SQLite3 database.</p>
|
2014-03-27 21:39:18 +09:00
|
|
|
</div>
|
2014-03-25 17:51:42 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
|
2014-03-28 05:31:32 +09:00
|
|
|
<p class="help-block text-center">General Settings of Gogs</p>
|
2014-03-27 21:39:18 +09:00
|
|
|
<div class="form-group">
|
2014-03-25 17:51:42 +09:00
|
|
|
<label class="col-md-3 control-label">Repository Path: </label>
|
2014-03-27 21:39:18 +09:00
|
|
|
|
2014-03-25 17:51:42 +09:00
|
|
|
<div class="col-md-8">
|
2014-03-30 06:50:51 +09:00
|
|
|
<input name="repo_path" type="text" class="form-control" placeholder="Type your repository directory" value="{{.repo_path}}" required="required">
|
2014-03-27 21:39:18 +09:00
|
|
|
|
2014-03-25 17:51:42 +09:00
|
|
|
<p class="help-block">The git copy of each repository is saved in this directory.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-28 22:06:48 +09:00
|
|
|
|
2014-03-27 21:39:18 +09:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-md-3 control-label">Run User: </label>
|
|
|
|
|
2014-03-25 17:51:42 +09:00
|
|
|
<div class="col-md-8">
|
2014-03-30 06:50:51 +09:00
|
|
|
<input name="run_user" type="text" class="form-control" placeholder="Type system user name" value="{{.run_user}}" required="required">
|
2014-03-28 05:31:32 +09:00
|
|
|
<p class="help-block">The user has access to visit and run Gogs.</p>
|
2014-03-25 17:51:42 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-28 22:06:48 +09:00
|
|
|
|
2014-03-30 06:50:51 +09:00
|
|
|
<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>
|
|
|
|
|
2014-03-28 22:06:48 +09:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-md-3 control-label">App URL: </label>
|
|
|
|
|
|
|
|
<div class="col-md-8">
|
2014-03-30 06:50:51 +09:00
|
|
|
<input name="app_url" type="text" class="form-control" placeholder="Type app root URL" value="{{.app_url}}" required="required">
|
2014-03-28 22:06:48 +09:00
|
|
|
<p class="help-block">This affects HTTP/HTTPS clone URL and somewhere in e-mail.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-27 21:39:18 +09:00
|
|
|
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
<p class="help-block text-center">Admin Account Settings</p>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-md-3 control-label">Username: </label>
|
|
|
|
<div class="col-md-8">
|
2014-03-30 06:50:51 +09:00
|
|
|
<input name="admin_name" type="text" class="form-control" placeholder="Type admin user name" value="{{.admin_name}}" required="required">
|
2014-03-27 21:39:18 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-28 20:26:22 +09:00
|
|
|
|
2014-03-30 06:50:51 +09:00
|
|
|
<div class="form-group {{if .Err_AdminPasswd}}has-error has-feedback{{end}}">
|
2014-03-27 21:39:18 +09:00
|
|
|
<label class="col-md-3 control-label">Password: </label>
|
|
|
|
<div class="col-md-8">
|
2014-03-30 06:50:51 +09:00
|
|
|
<input name="admin_pwd" type="password" class="form-control" placeholder="Type admin user password" value="{{.admin_pwd}}" required="required">
|
2014-03-28 20:26:22 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-03-30 06:50:51 +09:00
|
|
|
<div class="form-group {{if .Err_AdminEmail}}has-error has-feedback{{end}}">
|
2014-03-28 20:26:22 +09:00
|
|
|
<label class="col-md-3 control-label">E-mail: </label>
|
|
|
|
<div class="col-md-8">
|
2014-03-30 06:50:51 +09:00
|
|
|
<input name="admin_email" type="text" class="form-control" placeholder="Type admin user e-mail" value="{{.admin_email}}" required="required">
|
2014-03-27 21:39:18 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-03-25 17:51:42 +09:00
|
|
|
<hr/>
|
2014-03-27 21:39:18 +09:00
|
|
|
|
2014-03-25 17:51:42 +09:00
|
|
|
<div class="form-group text-center">
|
2014-03-28 05:31:32 +09:00
|
|
|
<button class="btn btn-danger btn-lg">Install Gogs</button>
|
2014-03-27 21:39:18 +09:00
|
|
|
<button class="btn btn-default btn-sm" type="button" data-toggle="modal" data-target="#advance-options-modal">
|
|
|
|
Advanced Options
|
|
|
|
</button>
|
2014-03-25 17:51:42 +09:00
|
|
|
</div>
|
2014-03-27 21:39:18 +09:00
|
|
|
|
|
|
|
<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">
|
2014-04-09 04:27:35 +09:00
|
|
|
<input name="smtp_host" type="text" class="form-control" placeholder="Type SMTP host address and port" value="{{.smtp_host}}">
|
2014-03-27 21:39:18 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2014-04-09 04:27:35 +09:00
|
|
|
<label class="col-md-3 control-label">Username: </label>
|
2014-03-27 21:39:18 +09:00
|
|
|
|
|
|
|
<div class="col-md-8">
|
2014-03-30 06:50:51 +09:00
|
|
|
<input name="mailer_user" type="text" class="form-control" placeholder="Type SMTP user e-mail address" value="{{.mailer_user}}">
|
2014-03-27 21:39:18 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-md-3 control-label">Password: </label>
|
|
|
|
|
|
|
|
<div class="col-md-8">
|
2014-03-30 06:50:51 +09:00
|
|
|
<input name="mailer_pwd" type="password" class="form-control" placeholder="Type SMTP user password" value="{{.mailer_pwd}}">
|
2014-03-27 21:39:18 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr/>
|
|
|
|
<p class="text-center help-block">Notification Settings</p>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2014-03-28 05:31:32 +09:00
|
|
|
<div class="col-md-offset-3 col-md-7">
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
2014-03-30 06:50:51 +09:00
|
|
|
<input name="register_confirm" type="checkbox" {{if .register_confirm}}checked{{end}}>
|
2014-03-28 05:31:32 +09:00
|
|
|
<strong>Enable Register Confirmation</strong>
|
|
|
|
</label>
|
|
|
|
</div>
|
2014-03-27 21:39:18 +09:00
|
|
|
|
2014-03-28 05:31:32 +09:00
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
2014-03-30 06:50:51 +09:00
|
|
|
<input name="mail_notify" type="checkbox" {{if .mail_notify}}checked{{end}}>
|
2014-03-28 05:31:32 +09:00
|
|
|
<strong>Enable Mail Notification</strong>
|
|
|
|
</label>
|
|
|
|
</div>
|
2014-03-27 21:39:18 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-28 05:31:32 +09:00
|
|
|
|
2014-03-27 21:39:18 +09:00
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-success" data-dismiss="modal">Confirm</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-03-25 17:51:42 +09:00
|
|
|
</form>
|
|
|
|
</div>
|
2014-04-20 15:54:26 +09:00
|
|
|
{{template "base/footer" .}}
|