Comments (7)
Maybe this can tie in to some very-abstract-which-I-have-not-yet-thought-through-idea on supporting environments. Maybe you would have this in your .gitify to version specific settings:
name: foo
data_directory: _data
data:
content:
type: content
etc: etc
settings:
type: settings
keys: [site_name, some_setting]
environments:
live:
setting_key: setting value
other_setting_key: setting value
dev:
setting_key: dev setting value
from gitify.
Ooh, I like that idea. Would the keys under data->settings be repeated under the environments, or would it be more like "any key defined in any of those locations would be saved"?
Would it make sense to make a UI within MODX to be able to edit the .gitify file? Particularly with settings, it would probably make sense to be able to do them with a series of checkboxes. Also, given the number of settings, would it make more sense to explicitly exclude specific keys rather than explicitly include keys?
from gitify.
Ooh, I like that idea. Would the keys under data->settings be repeated under the environments, or would it be more like "any key defined in any of those locations would be saved"?
I'm thinking they're two different things. The data>settings is for settings that you want to have the same value no matter the environment, while the environments covers settings that are specific to the environment... something like contentblocks.debug
could be enabled on a dev environment, for example, but disabled on stage and live.
The default environment might be set in a system setting, or could be passed on the command line like Gitify build --env=live
Would it make sense to make a UI within MODX to be able to edit the .gitify file? Particularly with settings, it would probably make sense to be able to do them with a series of checkboxes.
Good idea :D A "Gitify Configuration" component that basically writes the .gitify
file and perhaps has some git functions would be super cool, and definitely help get non-technical people on board with the workflow.
Also, given the number of settings, would it make more sense to explicitly exclude specific keys rather than explicitly include keys?
Not entirely sure about that.
Maybe additional options (like namespaces: [redactor,contentblocks]
and exclude_keys: [contentblocks.debug, foo.bar]
) would make it easier to add large amounts of settings if you want them all in, but I think as far as core settings go it would be best to specifically add which ones you want included, as some settings may have unintended side effects?
from gitify.
I'm thinking they're two different things. The data>settings is for settings that you want to have the same value no matter the environment, while the environments covers settings that are specific to the environment... something like contentblocks.debug could be enabled on a dev environment, for example, but disabled on stage and live.
Hmm. I think we're mostly talking about the same thing, but... How are you thinking this would be stored? I think it might make sense to have a settings.yaml file, which would be updated based on what .gitify tells it in terms of what settings should be stored. That is, .gitify says:
settings:
type: settings
environment: shared
keys: [site_name, some_setting]
environment: live
keys: [setting1, setting2]
environment: dev
keys: [setting1, setting2, setting3]
while settings.yaml has:
environments:
shared:
site_name: My awesome site
some_setting: Some value
live:
setting1: Monkey
setting2: Banana
dev:
setting1: Horse
setting2: Apple
setting3: My setting that isn't stored within gitify on the live site
(this could also be done as settings_shared.yaml, settings_live.yaml, and settings_dev.yaml)
I guess there are two problems I see with doing implicit includes:
- Unless we're hooking into the install process, every time an extra is added, someone needs to remember to go update .gitify to add any settings it might include (which may be somewhat difficult to even track down) -- and I don't know whether hooking into installation is even possible.
- I have a site with a not-too-insane number of extras, and there are over 300 settings. That's going to get really cumbersome within the .gitify file, I think.
In the use cases I can think of, it's far more likely that you'd want to have everything except for a few settings, rather than only having a few settings stored. I would say the "sensible defaults" method would be exclude.
Maybe, though, we could do something like:
settings:
type: settings
method: exclude
environment: shared
keys: [site_name, some_setting]
environment: live
keys: [setting1, setting2]
environment: dev
keys: [setting1, setting2, setting3]
Alternatively, we could set the method at the environment level:
settings:
type: settings
environment: shared
keys: [site_name, some_setting]
method: exclude
environment: live
keys: [setting1, setting2]
method: exclude
environment: dev
keys: [setting1, setting2, setting3]
method: include
I think that might get slightly confusing, but it's something to think about.
from gitify.
Environments are already in?
Is this documented somewhere?
from gitify.
Environments are only implemented in GitifyWatch currently: https://github.com/modmore/GitifyWatch#4-configure-the-gitify-environments
from gitify.
Ok, thanks for the clarification 👍
from gitify.
Related Issues (20)
- Getting YAML error on server but on local HOT 2
- Unable to run Gitify 1.0 HOT 3
- Can not install Gitify HOT 1
- Composer install of v2 : minimum stability issue HOT 2
- v1.x and PHP 8 compatibility issue (Symfony Yaml) HOT 7
- Error "Duplicate key" with ver. 2.0-alpha while build HOT 5
- Automatic adding(deleting) new line after <?php tag every "gitify build"
- Restore command fails with MODX 3 HOT 6
- errors when installing package in MODX3 HOT 4
- Unable to (re)set tinyint values to 0
- [MODX3] Error when extract MediaSource HOT 3
- PHP warning: Undefined array key "service" HOT 1
- modx:install command fails HOT 3
- New .gitify dump-method writes "api_key" and omits original "credential_file"-location HOT 1
- Comments in .gitify file are stripped out HOT 2
- modTemplateVarTemplate are getting overwritten by each other HOT 3
- Collections 4.0.0-pl not extractable any more HOT 4
- MODX could not create your database. Please manually create your database and then try again. HOT 2
- Unable to initialize project HOT 6
- Duplicates detected for modDashboardWidgetPlacement but no duplicates in database
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitify.