gancio/config.example.js

66 lines
1.4 KiB
JavaScript
Raw Normal View History

const path = require('path')
2019-04-30 15:16:50 +02:00
/**
* -[ GANCIO CONFIGURATION ]-
*
* -[ Database configuration ]-
2019-04-30 15:16:50 +02:00
* `development` configuration is enabled running `yarn dev`
* while `production` with `yarn start`
* ref: http://docs.sequelizejs.com/class/lib/sequelize.js~Sequelize.html#instance-constructor-constructor
*
2019-04-30 15:16:50 +02:00
*/
2019-04-30 15:16:50 +02:00
const DB_CONF = {
development: {
storage: path.join(__dirname, 'db.sqlite'),
dialect: 'sqlite'
2019-04-30 15:16:50 +02:00
},
production: {
2019-06-06 23:54:32 +02:00
username: '',
password: '',
database: 'gancio',
host: 'localhost',
dialect: 'postgres',
logging: false
}
2019-04-30 15:16:50 +02:00
}
const env = process.env.NODE_ENV || 'development'
/**
* -[ Main configuration ]-
*
*/
const config = {
server: {
port: '3000',
host: '0',
// uncomment to use unix socket to serve gancio
// path: '/tmp/gancio_socket',
},
locale: 'it',
title: 'GANCIO',
description: 'A shared agenda for radical communities',
baseurl: '' || 'http://localhost:3000',
2019-04-30 15:16:50 +02:00
// where events/users confirmation email are sent
admin: '',
2019-04-30 15:16:50 +02:00
// jwt salt secret, generate it randomly with
// < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;
2019-06-06 23:54:32 +02:00
secret: '',
2019-04-30 15:16:50 +02:00
2019-06-06 23:54:32 +02:00
// smtp account to send email
2019-04-30 15:16:50 +02:00
smtp: {
2019-06-06 23:54:32 +02:00
host: process.env.SMTP_HOST || 'mail.example.com',
2019-04-30 15:16:50 +02:00
secure: true,
auth: {
2019-06-06 23:54:32 +02:00
user: process.env.SMTP_USER || 'gancio@example.com',
pass: process.env.SMTP_PASS || ''
2019-04-30 15:16:50 +02:00
}
},
db: DB_CONF[env]
2019-06-06 23:54:32 +02:00
}
module.exports = config