mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix docker compose
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,6 @@ export default class EmailLog extends BaseModel {
|
||||
})
|
||||
public status?: MailStatus = undefined;
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user