Introduce connection string (database url) for roundcube.
Remove database choice from setup. Remove the old *DB_* database env variables from the documentation. The env vars are deprecated now. They will be removed after the upcoming Mailu release.main
parent
6f3a01e31c
commit
709edb522b
@ -1,45 +0,0 @@
|
|||||||
{% call macros.panel("info", "Database preferences") %}
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Which database back end would you like to use?</label>
|
|
||||||
<br/>
|
|
||||||
<select class="btn btn-primary dropdown-toggle" name="db_flavor" id="database">
|
|
||||||
{% for dbflavor in ["sqlite", "postgresql", "mysql"] %}
|
|
||||||
<option value="{{ dbflavor }}" >{{ dbflavor }}</option>
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
<div class="form-group" id="external_db" style="display: none">
|
|
||||||
<p>Set external database parameters for <b>Admin UI</b></p>
|
|
||||||
<label>DB User</label>
|
|
||||||
<input class="form-control" type="text" name="db_user" placeholder="Username" id="db_user">
|
|
||||||
<label>Db Password</label>
|
|
||||||
<input class="form-control" type="password" name="db_pw" placeholder="Password" id="db_pw">
|
|
||||||
<label>Db URL (for using a different port use the notation host:port )</label>
|
|
||||||
<input class="form-control" type="text" name="db_url" placeholder="URL" id="db_url">
|
|
||||||
<label>Db Name</label>
|
|
||||||
<input class="form-control" type="text" name="db_name" placeholder="Database Name" id="db_name">
|
|
||||||
<br/>
|
|
||||||
<div class="form-group" id="db_flavor_rc_sel" style="display: none">
|
|
||||||
<label>Which database back end would you like to use for roundcube?</label>
|
|
||||||
<br/>
|
|
||||||
<select class="btn btn-primary dropdown-toggle" name=db_flavor_rc id="database_rc">
|
|
||||||
{% for dbflavor_rc in ["sqlite", "postgresql", "mysql"] %}
|
|
||||||
<option value="{{ dbflavor_rc }}" >{{ dbflavor_rc }}</option>
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
<div class="form-group" id="roundcube_external_db" style="display: none">
|
|
||||||
<p>Set external database parameters for <b>Roundcube</b></p>
|
|
||||||
<label>DB User</label>
|
|
||||||
<input class="form-control" type="text" name="roundcube_db_user" placeholder="Username" id="roundcube_db_user">
|
|
||||||
<label>DB Password</label>
|
|
||||||
<input class="form-control" type="password" name="roundcube_db_pw" placeholder="Password" id="roundcube_db_pw">
|
|
||||||
<label>DB URL (for using a different port use the notation host:port )</label>
|
|
||||||
<input class="form-control" type="text" name="roundcube_db_url" placeholder="URL" id="roundcube_db_url">
|
|
||||||
<label>DB Name</label>
|
|
||||||
<input class="form-control" type="text" name="roundcube_db_name" placeholder="Database Name" id="roundcube_db_name">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endcall %}
|
|
@ -0,0 +1,17 @@
|
|||||||
|
Introduce SQLAlchemy database uris for configuring the admin and roundcube database.
|
||||||
|
Remove the database configuration option from the setup utility. Using a different
|
||||||
|
database system than SQLite is not necessary for Mailu. The Mailu database generally
|
||||||
|
contains static data.
|
||||||
|
|
||||||
|
The usage of the *DB_* environment variables is deprecated now.
|
||||||
|
They can still be used in the release after Mailu 1.9, but will be removed
|
||||||
|
after that version. This means it will be removed from master after the upcoming
|
||||||
|
Mailu release.
|
||||||
|
|
||||||
|
To start using the new environment variables, all *DB_* environment variables must be changed to:
|
||||||
|
SQLALCHEMY_DATABASE_URI=<SQLAlchemy database URL>
|
||||||
|
SQLALCHEMY_DATABASE_URI_ROUNDCUBE=<Roundcube database URL>
|
||||||
|
|
||||||
|
If no URI is specified, SQLite is used with these settings:
|
||||||
|
SQLALCHEMY_DATABASE_URI=sqlite:////data/main.db
|
||||||
|
SQLALCHEMY_DATABASE_URI_ROUNDCUBE=sqlite:////data/roundcube.db
|
Loading…
Reference in New Issue