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
-
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.project
file at its root, which serves as the project's main configuration. The repository's root folder should contain a.confix.repository
file, providing an overarching configuration for the entire repository.Confix generates a configuration for Visual Studio Code in the
.vscode
folder 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.repository
files. In this case, the repository should be opened in Visual Studio Code from the folder containing the relevant.confix.repository
file.To share the setup across repositories in a monorepo, you can create a
.confixrc
file at the root. When doing so, remember to set"isRoot": false
in the configuration, prompting Confix to continue looking for the root.confixrc
file.Setting Defaults
In repositories, you can predefine defaults for your
.confix.project
files using theproject
property. 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
component
property. 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.
File Structure
Repository Root
Monorepo
Beta Was this translation helpful? Give feedback.
All reactions