Repositories #6
PascalSenn
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Repositories
Confix repositories closely align with the "scope" of a Git repository. Meaning that usually you have one repository per git repository. In a typical repository, you might find various projects, modules, or packages. These can be backend services, workers, shared libraries, frontend applications, etc., each with could have separate configuration.
Every project, module, or package that has configuration files, should contain a
.confix.projectfile at its root, which serves as the project's main configuration. The repository's root folder should contain a.confix.repositoryfile, providing an overarching configuration for the entire repository.Confix generates a configuration for Visual Studio Code in the
.vscodefolder at the repository level. This means that when you need to configure your services' config files, you have open the repository root in Visual Studio Code. Otherwise you do not have the intellisense and validation (as the correct json schema is not loaded)For larger structures, such as mono-repos, you may find multiple
.confix.repositoryfiles. In this case, the repository should be opened in Visual Studio Code from the folder containing the relevant.confix.repositoryfile.To share the setup across repositories in a monorepo, you can create a
.confixrcfile at the root. When doing so, remember to set"isRoot": falsein the configuration, prompting Confix to continue looking for the root.confixrcfile.Setting Defaults
In repositories, you can predefine defaults for your
.confix.projectfiles using theprojectproperty. This feature promotes consistency and reduces redundancy by ensuring standard configurations across different projects.Similarly, if you wish to establish default configurations for all components, use the
componentproperty. This ability streamlines the component configuration process and ensures uniformity across your entire repository.You can also override or specify the variable providers and environments on a repository level. This is useful if you want to use different providers or repositories for a specific repository.
{ "environments": [ "dev", "prod" ], // Optional when in .confixrc "variableProviders" :[ // variableProviders config . Optional when in .confixrc ], "project": { // config like in .confix.project }, "component": { // config like in .confix.component }, "v }File Structure
Repository Root
Monorepo
Beta Was this translation helpful? Give feedback.
All reactions