gancio/config.example.js

71 lines
1.7 KiB
JavaScript
Raw Normal View History

2019-04-30 15:16:50 +02:00
/**
* -[ GANCIO CONFIGURATION ]-
*
* search and replace 'CHANGE ME'
*
* -[ 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
*/
const path = require('path')
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: {
username: 'CHANGE ME',
password: 'CHANGE ME',
2019-06-06 23:54:32 +02:00
database: 'gancio',
host: 'localhost',
dialect: 'postgres',
logging: false
}
2019-04-30 15:16:50 +02:00
}
const env = process.env.NODE_ENV || 'development'
const isDev = env === 'development'
/**
* -[ Main configuration ]-
*
*/
const config = {
server: {
port: '3000',
host: 'localhost', // use 0.0.0.0 to bind to all interface
// uncomment to use unix socket to serve gancio
// path: '/tmp/gancio_socket',
},
locale: 'it',
title: isDev ? 'GANCIO' : 'CHANGE ME',
description: isDev ? 'A shared agenda for radical communities' : 'CHANGE ME',
baseurl: isDev ? 'http://localhost:3000' : 'https://CHANGE_ME',
upload_path: isDev ? '/tmp/gancio_upload' : '/var/gancio/upload/',
2019-04-30 15:16:50 +02:00
// where events/users confirmation email are sent
admin: 'CHANGE ME',
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;
secret: isDev ? 'notreallyrandom' : 'CHANGE ME',
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: {
host: 'CHANGE ME', // mail.example.com
2019-04-30 15:16:50 +02:00
auth: {
user: 'CHANGE ME',
pass: 'CHANGE ME'
},
secure: true
2019-04-30 15:16:50 +02:00
},
db: DB_CONF[env]
2019-06-06 23:54:32 +02:00
}
module.exports = config