Commit 8c9d1537 authored by Girish Ramakrishnan's avatar Girish Ramakrishnan

Use manifest v2

parent 910cc3b6
......@@ -12,7 +12,7 @@
"version": "1.1.0",
"healthCheckPath": "/api/v1/status",
"httpPort": 3000,
"manifestVersion": 1,
"manifestVersion": 2,
"website": "https://releasebell.com",
"contactEmail": "support@cloudron.io",
"icon": "logo.png",
......@@ -27,5 +27,6 @@
"https://s3.amazonaws.com/cloudron-app-screenshots/io.cloudron.releasebell/c4ffba79e3b0d71859e07a1da4236436151bdaff/releasebell_3.png",
"https://s3.amazonaws.com/cloudron-app-screenshots/io.cloudron.releasebell/c4ffba79e3b0d71859e07a1da4236436151bdaff/releasebell_4.png"
],
"changelog": "file://CHANGELOG"
"changelog": "file://CHANGELOG",
"minBoxVersion": "4.1.4"
}
......@@ -28,8 +28,8 @@ module.exports = exports = {
}
};
const LDAP_URL = process.env.LDAP_URL;
const LDAP_USERS_BASE_DN = process.env.LDAP_USERS_BASE_DN;
const LDAP_URL = process.env.CLOUDRON_LDAP_URL;
const LDAP_USERS_BASE_DN = process.env.CLOUDRON_LDAP_USERS_BASE_DN;
const LOCAL_AUTH_FILE = path.resolve('users.json');
var users = {};
......@@ -83,16 +83,16 @@ function auth(req, res, next) {
}
if (AUTH_METHOD === 'ldap') {
var ldapClient = ldapjs.createClient({ url: process.env.LDAP_URL });
var ldapClient = ldapjs.createClient({ url: process.env.CLOUDRON_LDAP_URL });
ldapClient.on('error', function (error) {
console.error('LDAP error', error);
});
ldapClient.bind(process.env.LDAP_BIND_DN, process.env.LDAP_BIND_PASSWORD, function (error) {
ldapClient.bind(process.env.CLOUDRON_LDAP_BIND_DN, process.env.CLOUDRON_LDAP_BIND_PASSWORD, function (error) {
if (error) return next(new HttpError(500, error));
var filter = `(|(uid=${credentials.name})(mail=${credentials.name})(username=${credentials.name})(sAMAccountName=${credentials.name}))`;
ldapClient.search(process.env.LDAP_USERS_BASE_DN, { filter: filter }, function (error, result) {
ldapClient.search(process.env.CLOUDRON_LDAP_USERS_BASE_DN, { filter: filter }, function (error, result) {
if (error) return next(new HttpError(500, error));
var items = [];
......
......@@ -15,17 +15,17 @@ module.exports = exports = {
run: run
};
const CAN_SEND_EMAIL = (process.env.MAIL_SMTP_SERVER && process.env.MAIL_SMTP_PORT && process.env.MAIL_FROM);
const CAN_SEND_EMAIL = (process.env.CLOUDRON_MAIL_SMTP_SERVER && process.env.CLOUDRON_MAIL_SMTP_PORT && process.env.CLOUDRON_MAIL_FROM);
if (CAN_SEND_EMAIL) {
console.log(`Can send emails. Email notifications are sent out as ${process.env.MAIL_FROM}`);
console.log(`Can send emails. Email notifications are sent out as ${process.env.CLOUDRON_MAIL_FROM}`);
} else {
console.log(`
No email configuration found. Set the following environment variables:
MAIL_SMTP_SERVER
MAIL_SMTP_PORT
MAIL_SMTP_USERNAME
MAIL_SMTP_PASSWORD
MAIL_FROM
CLOUDRON_MAIL_SMTP_SERVER
CLOUDRON_MAIL_SMTP_PORT
CLOUDRON_MAIL_SMTP_USERNAME
CLOUDRON_MAIL_SMTP_PASSWORD
CLOUDRON_MAIL_FROM
`);
}
......@@ -223,19 +223,19 @@ function sendNotificationEmail(release, callback) {
if (error) return callback(error);
var transport = nodemailer.createTransport(smtpTransport({
host: process.env.MAIL_SMTP_SERVER,
port: process.env.MAIL_SMTP_PORT,
host: process.env.CLOUDRON_MAIL_SMTP_SERVER,
port: process.env.CLOUDRON_MAIL_SMTP_PORT,
auth: {
user: process.env.MAIL_SMTP_USERNAME,
pass: process.env.MAIL_SMTP_PASSWORD
user: process.env.CLOUDRON_MAIL_SMTP_USERNAME,
pass: process.env.CLOUDRON_MAIL_SMTP_PASSWORD
}
}));
const versionLink = `https://github.com/${project.name}/releases/tag/${release.version}`;
const settingsLink = process.env.APP_ORIGIN || '';
const settingsLink = process.env.CLOUDRON_APP_ORIGIN || '';
var mail = {
from: `ReleaseBell <${process.env.MAIL_FROM}>`,
from: `ReleaseBell <${process.env.CLOUDRON_MAIL_FROM}>`,
to: user.email,
subject: `${project.name} ${release.version} released`,
text: `A new release at ${project.name} with version ${release.version} was published. Read more about this release at ${versionLink}`,
......@@ -266,4 +266,4 @@ function sendNotifications(callback) {
});
}, callback);
});
}
\ No newline at end of file
}
......@@ -10,11 +10,11 @@ cat <<EOF > /run/database.json
{
"defaultEnv": "cloudron",
"cloudron": {
"host": "${MYSQL_HOST}",
"port": ${MYSQL_PORT},
"user": "${MYSQL_USERNAME}",
"password": "${MYSQL_PASSWORD}",
"database": "${MYSQL_DATABASE}",
"host": "${CLOUDRON_MYSQL_HOST}",
"port": ${CLOUDRON_MYSQL_PORT},
"user": "${CLOUDRON_MYSQL_USERNAME}",
"password": "${CLOUDRON_MYSQL_PASSWORD}",
"database": "${CLOUDRON_MYSQL_DATABASE}",
"driver": "mysql",
"multipleStatements": true
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment