fixes specific to heroku

This commit is contained in:
Alex Hoyau 2019-06-07 18:55:14 -05:00
parent 92579b028a
commit 7a30e14ed0
5 changed files with 16 additions and 10 deletions

View file

@ -14,7 +14,7 @@ NODE_ENV=development
# Set to a randomly generated 16 bytes string
SECRET_KEY=ChangeMeChangeMe
# URI of Mongo database that TellForm will connect to
# URI of Mongo database that TellForm will connect to
#DO NOT CHANGE
MONGODB_URI=mongodb://mongo/tellform
@ -121,4 +121,4 @@ APP_NAME=
APP_KEYWORDS=
# Set this to set the 'description' meta property in the HTML head
APP_DESC=
APP_DESC=

View file

@ -7,7 +7,7 @@
"addons": ["mongolab", "sendgrid", "heroku-redis"],
"env": {
"SUBDOMAINS_DISABLED": {
"description": "Disable support for running subdomains. (This should be true if you are not using your own custom domain.",
"description": "Disable support for running subdomains. (This should be true if you are not using your own custom domain.)",
"value": "TRUE"
},
"ENABLE_CLUSTER_MODE": {
@ -19,7 +19,8 @@
"value": "production"
},
"BASE_URL": {
"description": "The url of your heroku app."
"description": "The url of your heroku app.",
"required": false
},
"SOCKET_URL": {
"description": "Where you websockets will connect to (i.e. your heroku app url)"

View file

@ -334,13 +334,14 @@ module.exports = function(grunt) {
// Debug task.
grunt.registerTask('debug', ['lint', 'html2js:main', 'html2js:forms', 'concurrent:debug']);
// Lint task(s).
grunt.registerTask('lint', ['jshint', 'csslint', 'i18nlint:client', 'i18nlint:server']);
grunt.registerTask('lint:tests', ['jshint:allTests']);
// Build task(s).
grunt.registerTask('build', ['lint', 'loadConfig', 'cssmin', 'ngAnnotate', 'uglify', 'html2js:main', 'html2js:forms']);
grunt.registerTask('build:prod', ['loadConfig', 'cssmin', 'uglify', 'html2js:main', 'html2js:forms']);
//Setup task(s).
grunt.registerTask('setup', ['execute']);

View file

@ -19,9 +19,10 @@
"scripts": {
"addcontrib": "all-contributors add",
"generate": "all-contributors generate",
"start": "grunt",
"start": "node server.js",
"start:local": "grunt",
"test": "grunt test",
"postinstall": "bower install --config.interactive=false",
"postinstall": "bower install --config.interactive=false && grunt build:prod",
"init": "node scripts/setup.js"
},
"dependencies": {
@ -47,8 +48,7 @@
"grunt-contrib-csslint": "~1.0.0",
"grunt-contrib-cssmin": "~1.0.1",
"grunt-contrib-jshint": "~1.0.0",
"grunt-contrib-uglify": "~0.11.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-uglify": "~0.11.1",
"grunt-env": "~0.4.1",
"grunt-html2js": "^0.6.0",
"grunt-ng-annotate": "~1.0.1",
@ -88,7 +88,7 @@
"grunt-closure-compiler": "0.0.21",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-uglify": "^0.11.1",
"grunt-contrib-watch": "~0.6.1",
"grunt-execute": "^0.2.2",
"grunt-i18nlint": "github:jwarby/grunt-i18nlint",
"grunt-karma": "~0.12.1",

View file

@ -10,6 +10,10 @@ if(fs.existsSync(__dirname + '/.env')) {
else {
console.warn('unable to find .env file, expecting env vars');
}
// fix for heroku
process.env.MAILER_EMAIL_ID = process.env.MAILER_EMAIL_ID || process.env.SENDGRID_USERNAME;
process.env.MAILER_PASSWORD = process.env.MAILER_PASSWORD || process.env.SENDGRID_PASSWORD;
if(!process.env.NODE_ENV){
process.env.NODE_ENV = 'development';