You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
planka_custom/server/config/custom.js

38 lines
1.1 KiB
JavaScript

/**
* Custom configuration
* (sails.config.custom)
*
* One-off settings specific to your application.
*
* For more information on custom configuration, visit:
* https://sailsjs.com/config/custom
*/
const path = require('path');
const sails = require('sails');
module.exports.custom = {
/**
*
* Any other custom config this Sails app should use during development.
*
*/
baseUrl: process.env.BASE_URL,
userAvatarsPath: path.join(sails.config.paths.public, 'user-avatars'),
userAvatarsUrl: `${process.env.BASE_URL}/user-avatars`,
projectBackgroundImagesPath: path.join(sails.config.paths.public, 'project-background-images'),
projectBackgroundImagesUrl: `${process.env.BASE_URL}/project-background-images`,
attachmentsPath: path.join(sails.config.paths.public, 'attachments'),
attachmentsUrl: `${process.env.BASE_URL}/attachments`,
oidcIssuer: process.env.OIDC_ISSUER,
oidcClientId: process.env.OIDC_CLIENT_ID,
oidcClientSecret: process.env.OIDC_CLIENT_SECRET,
oidcRolesAttribute: process.env.OIDC_ROLES_ATTRIBUTE ?? 'groups',
oidcAdminRoles: process.env.OIDC_ADMIN_ROLES.split(",") ?? [],
};