mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-25 02:04:15 +02:00
adding mysql port to configs
This commit is contained in:
parent
bf784d1b1c
commit
73fee438ec
@ -174,7 +174,7 @@ export class SQLConnection {
|
||||
driver = {
|
||||
type: 'mysql',
|
||||
host: config.mysql.host,
|
||||
port: 3306,
|
||||
port: config.mysql.port,
|
||||
username: config.mysql.username,
|
||||
password: config.mysql.password,
|
||||
database: config.mysql.database,
|
||||
|
@ -38,6 +38,8 @@ export module ServerConfig {
|
||||
export class MySQLConfig {
|
||||
@ConfigProperty({envAlias: 'MYSQL_HOST'})
|
||||
host: string = '';
|
||||
@ConfigProperty({envAlias: 'MYSQL_PORT'})
|
||||
port: number = 3306;
|
||||
@ConfigProperty({envAlias: 'MYSQL_DATABASE'})
|
||||
database: string = '';
|
||||
@ConfigProperty({envAlias: 'MYSQL_USERNAME'})
|
||||
|
@ -36,31 +36,39 @@
|
||||
<ng-container *ngIf="settings.type == DatabaseType.mysql">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label" for="host" i18n>Host</label>
|
||||
<label class="col-md-2 control-label" for="mysql_host" i18n>Host</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control" placeholder="localhost"
|
||||
[(ngModel)]="settings.mysql.host" id="host" name="host" required>
|
||||
[(ngModel)]="settings.mysql.host" id="mysql_host" name="mysql_host" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label" for="database" i18n>Database</label>
|
||||
<label class="col-md-2 control-label" for="mysql_port" i18n>Port</label>
|
||||
<div class="col-md-10">
|
||||
<input type="number" class="form-control" placeholder="3306" min="0" max="65535"
|
||||
[(ngModel)]="settings.mysql.port" id="mysql_port" name="mysql_port" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label" for="mysql_database" i18n>Database</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control" placeholder="pigallery2"
|
||||
[(ngModel)]="settings.mysql.database" id="database" name="database" required>
|
||||
[(ngModel)]="settings.mysql.database" id="mysql_database" name="mysql_database" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label" for="username" i18n>Username</label>
|
||||
<label class="col-md-2 control-label" for="mysql_username" i18n>Username</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control" placeholder="username"
|
||||
[(ngModel)]="settings.mysql.username" id="username" name="username" required>
|
||||
[(ngModel)]="settings.mysql.username" id="mysql_username" name="mysql_username" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label" for="password" i18n>Password</label>
|
||||
<label class="col-md-2 control-label" for="mysql_password" i18n>Password</label>
|
||||
<div class="col-md-10">
|
||||
<input type="password" class="form-control" placeholder="password"
|
||||
[(ngModel)]="settings.mysql.password" id="password" name="password" required>
|
||||
[(ngModel)]="settings.mysql.password" id="mysql_password" name="mysql_password" required>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
Loading…
Reference in New Issue
Block a user