mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Disable SEND_MAILS for local development and test
.. but enable it by default for `docker-compose.override.yml`. If the developer uses `docker-compose` we can safely assume that a local smtp server for development is running.
This commit is contained in:
parent
c85c94aa40
commit
3f5e9a21cc
@ -5,6 +5,10 @@ GRAPHQL_PORT=4000
|
|||||||
GRAPHQL_URI=http://localhost:4000
|
GRAPHQL_URI=http://localhost:4000
|
||||||
CLIENT_URI=http://localhost:3000
|
CLIENT_URI=http://localhost:3000
|
||||||
MOCKS=false
|
MOCKS=false
|
||||||
|
SMTP_HOST=localhost
|
||||||
|
SMTP_PORT=1025
|
||||||
|
SMTP_USERNAME=
|
||||||
|
SMTP_PASSWORD=
|
||||||
|
|
||||||
JWT_SECRET="b/&&7b78BF&fv/Vd"
|
JWT_SECRET="b/&&7b78BF&fv/Vd"
|
||||||
MAPBOX_TOKEN="pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ"
|
MAPBOX_TOKEN="pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ"
|
||||||
|
|||||||
@ -28,6 +28,7 @@ export const serverConfigs = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const developmentConfigs = {
|
export const developmentConfigs = {
|
||||||
|
SEND_MAILS: process.env.SEND_MAILS || false,
|
||||||
DEBUG: process.env.NODE_ENV !== 'production' && process.env.DEBUG === 'true',
|
DEBUG: process.env.NODE_ENV !== 'production' && process.env.DEBUG === 'true',
|
||||||
MOCKS: process.env.MOCKS === 'true',
|
MOCKS: process.env.MOCKS === 'true',
|
||||||
DISABLED_MIDDLEWARES:
|
DISABLED_MIDDLEWARES:
|
||||||
|
|||||||
@ -41,13 +41,15 @@ export default {
|
|||||||
requestPasswordReset: async (_, { email }, { driver }) => {
|
requestPasswordReset: async (_, { email }, { driver }) => {
|
||||||
const code = uuid().substring(0, 6)
|
const code = uuid().substring(0, 6)
|
||||||
await createPasswordReset({ driver, code, email })
|
await createPasswordReset({ driver, code, email })
|
||||||
await transporter().sendMail({
|
if (CONFIG.SEND_MAILS) {
|
||||||
from: '"Human Connection" <info@human-connection.org>', // sender address
|
await transporter().sendMail({
|
||||||
to: email, // list of receivers
|
from: '"Human Connection" <info@human-connection.org>', // sender address
|
||||||
subject: 'Password Reset', // Subject line
|
to: email, // list of receivers
|
||||||
text: `Code is ${code}`, // plain text body
|
subject: 'Password Reset', // Subject line
|
||||||
html: `Code is <b>${code}</b>`, // plain text body
|
text: `Code is ${code}`, // plain text body
|
||||||
})
|
html: `Code is <b>${code}</b>`, // plain text body
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
|||||||
@ -5,6 +5,8 @@ services:
|
|||||||
image: djfarrelly/maildev
|
image: djfarrelly/maildev
|
||||||
ports:
|
ports:
|
||||||
- 1080:80
|
- 1080:80
|
||||||
|
networks:
|
||||||
|
- hc-network
|
||||||
webapp:
|
webapp:
|
||||||
build:
|
build:
|
||||||
context: webapp
|
context: webapp
|
||||||
@ -24,6 +26,10 @@ services:
|
|||||||
- backend_node_modules:/nitro-backend/node_modules
|
- backend_node_modules:/nitro-backend/node_modules
|
||||||
- uploads:/nitro-backend/public/uploads
|
- uploads:/nitro-backend/public/uploads
|
||||||
command: yarn run dev
|
command: yarn run dev
|
||||||
|
environment:
|
||||||
|
- SEND_MAILS=true
|
||||||
|
- SMTP_HOST=mailserver
|
||||||
|
- SMTP_PORT=25
|
||||||
neo4j:
|
neo4j:
|
||||||
environment:
|
environment:
|
||||||
- NEO4J_AUTH=none
|
- NEO4J_AUTH=none
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user