Monday, September 29, 2014

Re: Config: DB or git?

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJUKX4qAAoJEB267zEX1rwQC0IP/iW9xoJ47m7Cx2QMrH4jzLcj
cthMjYQn0xo/HJQ1HsT8FrjiVNKn0myo2bRkJm1dbrkf4slogSiU8tpaVPJFJMJ1
MwlJ6zNdUQGAgI348MEh5dweFOjQ+cKhuak5Kdxyr5RjQqfm+PwGgmOYeFRrxLWX
9g3bIkRtItRkegYytw9V4LOljM5v+u448i2elQPtQ9KA56vf0fB+dPjtuuyYMy41
6H7r8U41o3tQxBTQ+7F5KD5wHZJjTOGuHKpU/45xt3CHJxubNYyGCmAIiENpR1c5
aKFoDZEmBRRk06o88Bf7boBuQGbmzGpAoObL48cGlzut7RpR5hx27war5PZFtg5R
81gC/icg3WD1hGufUq56iKx4JNm46vwZFwhbiLfBozQm6rhiQJFq0XyX79CpAtr6
7MrEFBQaececiFtyIe2oQ7UGwsB49+zcmdHd32TUyCcnHB71SZzhA54kQ02iU69v
YdjzeiIeAlwY9VG0+/Ox6FaIpCRxy2CJiV1y4vRV66rtQV00S/FHUWA3krU82TqO
6gVSGNM7SssJHGT8T2VLNbe3ycr2BKQ/aRrpg2IR/0sqK+GjUm8qAGiequQXE6lR
Ie+SlgJQ5Se+QFLG3kIePRvThZN6IMCp13a3rj2TLzQqPaAaBswtRx2Y0AXnilAP
1ediaI/+CblbJxc4sD23
=iWFr
-----END PGP SIGNATURE-----
On 29 Sep 2014, at 17:13, Javier Guerra Giraldez <javier@guerrag.com> wrote:

On Mon, Sep 29, 2014 at 8:15 AM, Alejandro Varas G.
<alej0varas@gmail.com> wrote:
But where does configuration belong?

"To the environment"


this is the currently fashionable answer, but I haven't seen any
justification for it.  Unfortunately, the 12factors manifesto tells
the how, but very little of the why.

In my experience, environment variables are clumsy, fragile and a pain
to work with.

I guess a more balanced option would be to store somewhere else,
probably the database (although i'm not too opposed to VCS) with the
host-variable parts (or everything, who cares about a couple KB extra
storage?) as a set indexed by hostname, which is read from the
environment.


I see configurable settings, like those in the settings module, as code settings, and those you would put in the DB as user customizable settings. The former are meant to be changed by developers and sys admins, and the latter by website users. In my opinion settings module changes are mostly related to staging or performance rather than user oriented. Apart from there are a number of interesting Django apps in Djangopackages [1] that allow you to put your settings in the DB.


Regards

No comments:

Post a Comment