add ssl option for database

This commit is contained in:
Michael Schramm 2021-05-02 14:25:46 +02:00
parent a74f3888d1
commit 42a1bf9555
2 changed files with 2 additions and 0 deletions

View File

@ -26,4 +26,5 @@
| DATABASE_TABLE_PREFIX | *empty* | prefix all tables if used within same database as other applications. |
| DATABASE_LOGGING | `false` | if `true` all db interactions will be logged to stdout |
| DATABASE_MIGRATE | `true` | can be used in load balanced environments to only allow one container to perform migrations / manually execute migrations
| DATABASE_SSL | `false` | if `true` will require ssl database connection |

View File

@ -110,6 +110,7 @@ export const imports = [
synchronize: false,
type: configService.get<string>('DATABASE_DRIVER', 'sqlite') as any,
url: configService.get<string>('DATABASE_URL', 'sqlite://data.sqlite'),
ssl: configService.get<string>('DATABASE_SSL', 'false') === 'true',
entityPrefix: configService.get<string>('DATABASE_TABLE_PREFIX', ''),
logging: configService.get<string>('DATABASE_LOGGING', 'false') === 'true',
entities,