-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #1721 #1722
Fix #1721 #1722
Conversation
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. |
4. Update any configuration variables, or accept the defaults for a quick evaluation (they can be changed later to enable full functionality) | ||
5. Click on the "Deploy app" button | ||
6. When complete, click on the "View app" button | ||
## Self Hosting - Heroku + Atlas Deployment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were you able to test this? For the web editor in development, staging, and production, I have an extra step with using Atlas which is whitelisting certain IP addresses that can connect to the database. If it seems to be necessary here, would you mind adding it to the documentation? Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and no. The setup works fine with all IP addresses allowed in Atlas (yikes) but I wasn't clever enough to limit access to a single dyno/project in Heroku. Thought I had with the Fixie Socks addon but no luck. The ObjectRocket for MongoDB addon works fine and starts at $46/mo.
What do you think about a rewrite to the effect of "You can demo your own instance of the Editor for free using Atlas, but you really should use something like ObjectRocket for production. Here's how you do both."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, that's surprising that Fixie Socks didn't work! It seems like this is just what it's for...
I don't want to add too many configuration suggestions to the guide—maybe it would be helpful to link to this article on Using MongoDB Atlas with Heroku?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so as well. Tried again fresh this morning with both the Fixie Socks and QuotaGuard Static IP's addons and wound up hitting walls with each. Simply copying the static IP’s provided won’t do it.
TL;DR ¯\(ツ)/¯
The article you shared is straightforward enough to follow and aligns with this nice write up from freeCodeCamp. However, both guides punt on the specifics of configuring the network addons. I thought I was in crazy town, but at least a few other people have hit similar stumbling blocks.
- How to use Fixie Socks (Heroku add-on) to connect to mongodb via mongoose (I tried and failed to follow the QuotaGuard documentation)
- Connecting to mongodb using mongoose and Fixie (Heroku add-on) (one commenter gave up on Fixie Socks)
The Editor crashed on start up when I tried the QuotaGuard wrapper approach. I think this is because the addon isn't (or can't be?) provisioned automatically, so the proxy isn't available and MongoDB fails to connect.
I think using Fixie Socks requires modifying server.js
along the lines of their examples for other databases. Dunno if this use case warrants adding a dependency and more code to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for trying this again! It's really frustrating that this is so difficult to configure. Maybe for now the best approach is to get this working with MongoDB by whitelisting all IPs, and then in the future figure out how to make a more secure solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a total space cadet–sorry for the delay! Just updated the guide to include the article you shared along with a note of caution. Here is a working version of the Editor launched from my fork.
Fixes #1721
I have verified that this pull request:
npm run lint
)develop
branch. (If I was asked to make more changes, I have made sure to rebase ontodevelop
then too)Fixes #123