1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-31 15:06:24 -07:00
gochan/templates/install.html

72 lines
2.4 KiB
HTML
Raw Normal View History

<form class="install-container" method="POST" action="/install/{{.nextPage}}">
{{if eq "" .page}}
<p>Welcome to the Gochan installer! This installer will help you configure Gochan, including setting the necessary directories and connecting to the SQL database, in preparation for running a fresh Gochan installation or migrating another imageboard database (if supported) to Gochan.</p>
<p class="text-bold">This does not install files like templates, or provision the database. It only creates a configuration file for gochan to use.</p>
{{else if eq .page "license"}}
<p class="text-center">Gochan is licensed under the BSD 3-Clause License, shown below. By using Gochan, you agree to the terms of this license,</p>
<textarea class="license">{{.license}}</textarea>
{{else if eq .page "paths"}}
<table>
<tr>
2025-05-19 22:29:56 -07:00
<th>Output gochan.json Directory</th>
<td><input type="text" name="configdir" required/></td>
</tr>
<tr>
<th>Templates Directory</th>
<td><input type="text" name="templatedir" value="{{.systemCriticalConfig.TemplateDir}}"/></td>
</tr>
<tr>
<th>Document Root</th>
<td><input type="text" name="documentroot" value="{{.systemCriticalConfig.DocumentRoot}}"/></td>
</tr>
<tr>
<th>Log Directory</th>
<td><input type="text" name="logdir"/></td>
</tr>
<tr>
<th>Web Root</th>
<td><input type="text" name="webroot" value="{{.systemCriticalConfig.WebRoot}}"/></td>
</tr>
</table>
{{else if eq .page "database"}}
<table>
<tr>
<th>SQL Provider</th>
<td><select name="dbtype" required>
<option value="" disabled selected>Select a database</option>
<option value="mysql">MySQL/MariaDB</option>
<option value="postgres">PostgreSQL</option>
<option value="sqlite3">SQLite</option>
</select></td>
</tr>
<tr>
<th>Database Host</th>
<td><input type="text" name="dbhost" required/></td>
</tr>
<tr>
<th>Database Name</th>
<td><input type="text" name="dbname" required/></td>
</tr>
<tr>
<th>Database User</th>
<td><input type="text" name="dbuser" required/></td>
</tr>
<tr>
<th>Database Password</th>
<td><input type="password" name="dbpass"/></td>
</tr>
<tr>
<th>Database Prefix</th>
<td><input type="text" name="dbprefix"/></td>
</tr>
</table>
{{else if eq .page "dbtest"}}
<p class="text-center">{{.testResult}}</p>
{{else}}
<p class="text-center">Invalid page</p>
{{end}}
<section class="buttons">
<input type="submit" value="{{.nextButton}}" />
</section>
</form>