@@ -170,7 +170,7 @@ export class PostgresPlugin implements DepkerPlugin {
170
170
value . PGSQL_NAME = database ;
171
171
value . PGSQL_USER = username ;
172
172
value . PGSQL_PASS = password ;
173
- value . PGSQL_URL = `postgresql ://${ value . PGSQL_USER } :${ value . PGSQL_PASS } @${ value . PGSQL_HOST } :${ value . PGSQL_PORT } /${ value . PGSQL_NAME } ` ;
173
+ value . PGSQL_URL = `postgres ://${ value . PGSQL_USER } :${ value . PGSQL_PASS } @${ value . PGSQL_HOST } :${ value . PGSQL_PORT } /${ value . PGSQL_NAME } ?sslmode=disable ` ;
174
174
return value ;
175
175
} ) ;
176
176
}
@@ -216,7 +216,7 @@ export class PostgresPlugin implements DepkerPlugin {
216
216
217
217
const database = name ;
218
218
const username = name ;
219
- const password = generator . generate ( ) ;
219
+ const password = generator . generate ( 20 , true , true , false ) ;
220
220
221
221
await this . exec ( [
222
222
`DROP USER IF EXISTS ${ username } ` ,
@@ -260,7 +260,7 @@ export class PostgresPlugin implements DepkerPlugin {
260
260
value . PGSQL_NAME = name ;
261
261
value . PGSQL_USER = config . username ;
262
262
value . PGSQL_PASS = config . password ;
263
- value . PGSQL_URL = `postgresql ://${ value . PGSQL_USER } :${ value . PGSQL_PASS } @${ value . PGSQL_HOST } :${ value . PGSQL_PORT } /${ value . PGSQL_NAME } ` ;
263
+ value . PGSQL_URL = `postgres ://${ value . PGSQL_USER } :${ value . PGSQL_PASS } @${ value . PGSQL_HOST } :${ value . PGSQL_PORT } /${ value . PGSQL_NAME } ?sslmode=disable ` ;
264
264
return value ;
265
265
} else if ( config . databases ?. [ name ] ) {
266
266
const value : Record < string , any > = { } ;
@@ -269,7 +269,7 @@ export class PostgresPlugin implements DepkerPlugin {
269
269
value . PGSQL_NAME = name ;
270
270
value . PGSQL_USER = config . databases [ name ] . username ;
271
271
value . PGSQL_PASS = config . databases [ name ] . password ;
272
- value . PGSQL_URL = `postgresql ://${ value . PGSQL_USER } :${ value . PGSQL_PASS } @${ value . PGSQL_HOST } :${ value . PGSQL_PORT } /${ value . PGSQL_NAME } ` ;
272
+ value . PGSQL_URL = `postgres ://${ value . PGSQL_USER } :${ value . PGSQL_PASS } @${ value . PGSQL_HOST } :${ value . PGSQL_PORT } /${ value . PGSQL_NAME } ?sslmode=disable ` ;
273
273
return value ;
274
274
} else {
275
275
throw new Error ( `PostgreSQL database is not configured with name: ${ name } ` ) ;
@@ -327,7 +327,7 @@ export class PostgresPlugin implements DepkerPlugin {
327
327
const config = await this . depker . config . service < PostgresServiceConfig > ( PostgresPlugin . NAME ) ;
328
328
if ( ! config . username || ! config . password ) {
329
329
config . username = "postgres" ;
330
- config . password = generator . generate ( ) ;
330
+ config . password = generator . generate ( 20 , true , true , false ) ;
331
331
await this . depker . config . service ( PostgresPlugin . NAME , ( ) => config ) ;
332
332
}
333
333
0 commit comments