fix dockerization
This commit is contained in:
@@ -4,18 +4,11 @@
|
||||
"dialect": "sqlite",
|
||||
"logging": false
|
||||
},
|
||||
"test": {
|
||||
"username": "root",
|
||||
"password": null,
|
||||
"database": "database_test",
|
||||
"host": "127.0.0.1",
|
||||
"dialect": "mysql"
|
||||
},
|
||||
"production": {
|
||||
"username": "root",
|
||||
"password": null,
|
||||
"database": "database_production",
|
||||
"host": "127.0.0.1",
|
||||
"dialect": "mysql"
|
||||
"username": "docker",
|
||||
"password": "docker",
|
||||
"database": "gancio",
|
||||
"host": "db",
|
||||
"dialect": "postgres"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
p= t('registration_email')
|
||||
|
||||
---
|
||||
small #{config.title}
|
||||
hr
|
||||
small #{config.title} / #{config.description}
|
||||
br
|
||||
small #{config.baseurl}
|
||||
13
app/mail.js
13
app/mail.js
@@ -6,7 +6,6 @@ moment.locale('it')
|
||||
|
||||
const mail = {
|
||||
send (addresses, template, locals) {
|
||||
locals.locale = config.locale
|
||||
const email = new Email({
|
||||
views: { root: path.join(__dirname, 'emails') },
|
||||
juice: true,
|
||||
@@ -20,7 +19,10 @@ const mail = {
|
||||
from: `${config.title} <${config.smtp.auth.user}>`
|
||||
},
|
||||
send: true,
|
||||
i18n: {},
|
||||
i18n: {
|
||||
locales: ['en', 'es', 'it'],
|
||||
defaultLocale: config.locale
|
||||
},
|
||||
transport: config.smtp
|
||||
})
|
||||
return email.send({
|
||||
@@ -29,7 +31,12 @@ const mail = {
|
||||
to: addresses,
|
||||
bcc: config.admin
|
||||
},
|
||||
locals: { ...locals, config, datetime: datetime => moment(datetime).format('ddd, D MMMM HH:mm') }
|
||||
locals: {
|
||||
...locals,
|
||||
locale: config.locale,
|
||||
config,
|
||||
datetime: datetime => moment(datetime).format('ddd, D MMMM HH:mm')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user