common: &common standalone: true loglevel: info search_backend: "_env:SEARCH_BACKEND:" sqlalchemy_index_database: "_env:SQLALCHEMY_INDEX_DATABASE:sqlite:////tmp/docker-registry.db"
--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
host:
env: MYAPP_HOST
port:
value: 80
approot:
value: localhost
env: MYAPP_APPROOT
--
MichaelI really like this. My only comment is that forcing an 'env' child when you may not want/use it doesn't make me that happy (perhaps I am just reading the code wrong.. in which case this is all for naught!).
As a user, my preference would be for a less-strict settings file (perhaps still verbose in the scaffolding); and generate run-time errors if a value is not supplied when it is supposed to be.Put another way, it seems *more* confusing for a user to have to go into Application.hs rather than just a config file to use/force environment variables.. whereas allowing config files that looked like..host:
env: MYAPP_HOST
port:
value: 80
approot:
value: localhost
env: MYAPP_APPROOT..would allow a someone other than the (or even, a) developer to intuitively know how to deploy things, and/or change how they are deployed.. without having to look at or change haskell code.
It might remain unclear to someone just looking at the settings file if value trumped env or viceversa; but generally if people can just remove one or the other to get the results they want it wouldn't really matter.
You mean: it should also be possible to have a setting in the YAML file without a corresponding environment variable? Yes, that's supported, both with the original syntax I had, and with Greg's improved syntax. For example, look at the "copyright" setting.
--
Going along with what I said to Alexandr: I'd rather the scaffolding just make a decision instead of trying to provide choices. Just providing the different database backends is quite a bit of variation, and trying to cross that with other arbitrary decision points could be very painful. So I'd like to say: either we use ClassyPrelude, or we don't. And whichever way we choose, let's document how to make the switch to the other on the Wiki, with a link in the scaffolding.Now, answering the real question: I think ClassyPrelude is ready to be promoted to the scaffolding. I use it in all of my projects now, and I haven't run into issues. I also haven't heard complaints about it confusing people, especially since the move to mono-traversable. So that's a +1 from me. Any other views on it?
On Thu Nov 20 2014 at 6:04:18 PM Greg Weber <gr...@gregweber.info> wrote:
speaking of ClassyPrelude, are we ready to put it in the scaffolding at least as something to be uncommented?
On Wed, Nov 19, 2014 at 10:51 PM, Michael Snoyman <mic...@snoyman.com> wrote:
Geoff: PORT is already supported by Keter, FP Haskell Center, yesod devel, and Heroku, and APPROOT is supported by the former two. Besides breaking that compatibility, adding a YESOD_ prefix would mean tooling would have to specifically target Yesod, as opposed to having general-purpose deployment techniques. So I'm -1 on making the YESOD_ prefix the default, but the nice thing in this change is that it's now trivial to *change* the default.Alexandr: What's the use case you'd want a Foundation-less Import for? It might be the same as just importing ClassyPrelude.Yesod. My concern about doing something like that would be trying to meet everyone's needs. Someone else might want all of Import, but without Foldable generalizations, for instance. It's unlikely that we'll be able to find a design point that solves everyone's desires at once. I think the design goal should be intelligent defaults and easy customization, while keeping things as small as possible.
On Thu Nov 20 2014 at 8:41:34 AM Alexandr Kurilin <al...@kurilin.net> wrote:
Looks like a welcome change, I actually used to do something something very similar in a different language and it worked pretty well there.On a related note, I learned today that Foundation-less Import might be also a good idea for when you want Import, but none of Foundation stuff that comes with it. Is that something you folks might consider as well for scaffold refactoring?
Also exciting to see ClassyPrelude being integrated with Yesod, just learned about it today.
On Wed, Nov 19, 2014 at 10:23 PM, geoff <geoff...@gmail.com> wrote:
On Wed, Nov 19, 2014 at 5:57 PM, Michael Snoyman <mic...@snoyman.com> wrote:You mean: it should also be possible to have a setting in the YAML file without a corresponding environment variable? Yes, that's supported, both with the original syntax I had, and with Greg's improved syntax. For example, look at the "copyright" setting.
Okay; I think I see what I misunderstood (I thought the values has to be of type {foo: {value: x, env:y}} even when ignoring env..In any case, with the embedded _env with default it is basically perfect. If the scaffolding will use the env by default; probably the env varriables should be in a yesod/app name space $YESOD_HOST $YESOD_PORT, etc.This will make docker deployment even more straight forward
--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.
On Thu, Nov 20, 2014 at 9:41 AM, Christopher Reichert <creic...@gmail.com> wrote:
<signature.asc>
--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+u...@googlegroups.com.