fix docker compose

This commit is contained in:
Simon Larsen
2023-07-22 14:35:31 +01:00
parent 42b80bab3c
commit 16166a70f8
4 changed files with 8 additions and 9 deletions

View File

@@ -12,13 +12,11 @@ export class Service extends DatabaseService<Model> {
public toEmailServer(
projectSmtpConfig: Model | undefined
): EmailServer | undefined {
if (!projectSmtpConfig) {
return undefined;
}
if(!projectSmtpConfig.id){
if (!projectSmtpConfig.id) {
throw new BadDataException('Project SMTP config id is not set');
}

View File

@@ -234,7 +234,6 @@ export default class EmailLog extends BaseModel {
})
public status?: MailStatus = undefined;
@ColumnAccessControl({
create: [],
read: [

View File

@@ -88,13 +88,15 @@ export default class MailService {
}
public static getEmailServer(obj: JSONObject): EmailServer {
if (!this.isSMTPConfigValid(obj)) {
throw new BadDataException('SMTP Config is not valid');
}
return {
id: obj && obj['SMTP_ID'] ? new ObjectID(obj['SMTP_ID'].toString()) : undefined,
id:
obj && obj['SMTP_ID']
? new ObjectID(obj['SMTP_ID'].toString())
: undefined,
username: obj['SMTP_USERNAME']?.toString()!,
password: obj['SMTP_PASSWORD']?.toString()!,
host: new Hostname(obj['SMTP_HOST']?.toString()!),
@@ -225,8 +227,8 @@ export default class MailService {
emailLog.projectId = options.projectId;
emailLog.toEmail = mail.toEmail;
emailLog.subject = mail.subject;
if(options.emailServer?.id){
if (options.emailServer?.id) {
emailLog.projectSmtpConfigId = options.emailServer?.id;
}
}

View File

@@ -19,7 +19,7 @@ services:
postgres:
ports:
- "5400:5432" # for access to postgres
- "5400:5432" # for access to postgres for backups. If you dont need backup, you can comment this line out to make it more secure.
extends:
file: ./docker-compose.base.yml
service: postgres