-
Notifications
You must be signed in to change notification settings - Fork 530
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
Amending initial settings #25
Conversation
daaray
commented
Feb 12, 2017
- Add django-dotenv support to move more toward common django/wagtail conventions WRT settings file
- add support for local.py settings file
- fix vagrant db issues by building abs path to sqlite db file
- adjust readme accordingly
…ettings file; fix Vagrant issues, adjust readme accordingly
@heymonkeyriot @shacker @ArnarTumi Guys, this PR changes setup a bit, but is more inline with current standards. I will refrain from merging until I can get one or more sets of your eyes on it. |
I've personally never used dotenv before, but this certainly looks like a more elegant way to handle those variables. Playing devil's advocate the only question I have is whether that elegance justifies introducing a new piece of tooling? I think it probably does, just want to double check. It's great to have Would be interested to hear what @shacker and @ArnarTumi think too. |
A few additional comments:
Both of the above lead me to believe that the extra dependency (and additional docs) warrant the change, as it will encourage better development practices. |
I'm going to disagree with the idea of using a dotenv, for these reasons:
I think dotenv adds to the noise and doesn't really advance the ball for the user. |
The important thing is to keep local settings out of the VCS, and that's trivially easy to do with |
@shacker This approach might make more sense now that the Heroku PR was merged into master and subsequently into this branch. Heroku provides a push button deploy. For those individuals that want/need to try the demo locally and have a further need to make their demo web accessible, this path has the least resistance (and was supported in the previous demo). Unfortunately, Heroku:
The previous demo worked around this issue by forcing postgres on the user, utilized a non-DRY pattern for settings, and commingled All The Requirements in one file for both local and Heroku support. I completely agree that the primary goal of this repo is to provide an educational tool for Wagtail. But, I also believe that we should abide by conventions and best practices du jour as a secondary goal. To be fair, I may be biased by the patterns we utilize at work. If there is an alternative suggestion to allow for support of local and Heroku deploys, I am all ears. A compromise might be to move the docs regarding local env var setting to a separate section and adjust the |
Oh, interesting - I didn't realize Heroku didn't support having a local.py. Although this article implies that it is supported (but also says that's not the most up to date approach). Well, now I'm torn. I personally don't see any value to having this demo site run on Heroku, or in us trying to solve deployment challenges for the user - it all feels like a big distraction from our purpose. But am pretty sure I'm in the minority with this opinion. So, IF we're going to maintain Heroku support, AND Heroku doesn't like local.py AND Heroku doesn't support sqlite, then yes, we need to change up the way we're doing things. I don't want to have two approaches - one for people who want to deploy and another for those who don't - so we need to consolidate. It sounds to me like Heroku support will force our hand into moving to postgres and using dotenv. Choices:
Show of hands? |
+1 for Heroku. People do use the deploy-to-Heroku button on the current wagtaildemo (and complain when it breaks :-) ), and it's somewhat likely that we'll choose Heroku for hosting a public demo site (a long time wishlist item that's been put off because we didn't have a demo app that was up to scratch...) |
I think it's important that we support users who want to be able to deploy this. I think we're assuming a lot of knowledge if we think someone coming fresh to Wagtail will be able to get it deployed without some direction. Speaking for myself coming from working on PHP, with standard LAMP stack thinking, everything about deploying Wagtail initially confounded me, and the old demo site didn't help me much because of the co-mingling of the settings as @daaray mentioned. Locally though we can presumably maintain sqlite rather than Postgres? It certainly speeds up the initial local build time. Whilst I think it may be out side the scope of this initial build working out how we can deploy in a pain-free way for those non-technical users to see the admin is something we should have in the back of our heads too. This feels like it would facilitate us in doing that down the line. I think then my vote goes on the keeping of dotenv side of things. |
We can address any remaining issues in followup tickets. Thanks for the discussion! |