Closed surfjedi closed 10 years ago
Feel free to reopen with details of the error from the heroku logs, but we do need more information to pursue it.
I got it to go in the end by removing the data folder from the .gitignore file. And then just added the mongolab URI details. So that heroku got the data/local.js.
Is there a better way to do this tho so that you can run off local mongodb, then deploy?
Yes: our code should support environment variables for everything vital in local.js. You can set those in heroku, and also in your dev environment, or have them just fall back to defaults in dev when the environment variable is not set. We'd welcome pull requests on that.
Processing of data/local.js is in the apostrophe-site module now.
On Thu, Nov 21, 2013 at 6:04 PM, surfjedi notifications@github.com wrote:
I got it to go in the end by removing the data folder from the .gitignore file. And then just added the mongolab URI details. So that heroku got the data/local.js.
Is there a better way to do this tho so that you can run off local mongodb, then deploy?
— Reply to this email directly or view it on GitHubhttps://github.com/punkave/apostrophe-sandbox/issues/19#issuecomment-29033680 .
Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com
Was injecting sensitive or environment-specific variables through env variables ever implemented? Or is there a workaround you can suggest? I'll have dev and prod instances of my Apostrophe site running in Heroku and would like to configure different databases, etc via Heroku environment variables.
Simplest thing is probably to stop excluding data/local.js from deployment and github, and write it like:
module.exports = {
db: {
url: process.env.DB_URL
}
}
Or similar (this is just off the cuff). Boom, everything comes from the environment.
On Fri, May 20, 2016 at 8:28 PM, David Beers notifications@github.com wrote:
Was injecting sensitive or environment-specific variables through env variables ever implemented? Or is there a workaround you can suggest? I'll have dev and prod instances of my Apostrophe site running in Heroku and would like to configure different databases, etc via Heroku environment variables.
— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/punkave/apostrophe-sandbox/issues/19#issuecomment-220747337
THOMAS BOUTELL, DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com
Or:
module.exports = require('local.' + process.env.ENVIRONMENT + '.js');
To just use one environment variable as a switch and load another file. You can pretty much do as you like in local.js.
On Fri, May 20, 2016 at 9:18 PM, Tom Boutell tom@punkave.com wrote:
Simplest thing is probably to stop excluding data/local.js from deployment and github, and write it like:
module.exports = { db: { url: process.env.DB_URL } }
Or similar (this is just off the cuff). Boom, everything comes from the environment.
On Fri, May 20, 2016 at 8:28 PM, David Beers notifications@github.com wrote:
Was injecting sensitive or environment-specific variables through env variables ever implemented? Or is there a workaround you can suggest? I'll have dev and prod instances of my Apostrophe site running in Heroku and would like to configure different databases, etc via Heroku environment variables.
— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/punkave/apostrophe-sandbox/issues/19#issuecomment-220747337
THOMAS BOUTELL, DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com
THOMAS BOUTELL, DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com
Ah, that last suggestion is perfect. Thanks, Tom @boutell.
I should have thought of it sooner!
On Sat, May 21, 2016 at 5:07 PM, David Beers notifications@github.com wrote:
Ah, that last suggestion is perfect. Thanks, Tom @boutell https://github.com/boutell.
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/punkave/apostrophe-sandbox/issues/19#issuecomment-220800380
THOMAS BOUTELL, DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com
I am trying to get the sandbox running on heroku.
I have added a mongolab DB and can run the sandbox of that on my local.
But when I upload to heroku all i can get is an "h10" error - appcrashed - that's it..
What are the requirements to change in app.js, local.js, or what ever to deploy to heroku?
thanks in advance