Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

facil and teams with more than one developer #34

Closed
costa100 opened this issue Feb 8, 2022 · 4 comments
Closed

facil and teams with more than one developer #34

costa100 opened this issue Feb 8, 2022 · 4 comments

Comments

@costa100
Copy link

costa100 commented Feb 8, 2022

Hello,

What is the recommended way to configure facil when more than one developer works on a project, and developers use individual development databases?

Thanks

@costa100
Copy link
Author

costa100 commented Feb 9, 2022

I ended up placing the connection strings in the appsettings.development.json file. This file is not committed in git. One of the other things we need to do when we get a new version updated by another developer, is to apply his database updates.

Any other thoughts or advice, perhaps there is a better way?

Also, please improve this paragraph:

# 'envVars' allow you to use configuration values from environment varibles. Supply the

I do not understand the behaviour, what it means exactly that the prefix will be removed from the environment variable. Why does it need to be removed? An example would help a lot.

Thanks!

@cmeeren
Copy link
Owner

cmeeren commented Feb 9, 2022

I believe user secrets are the standard way to solve this.

appsettings.development.json should, as I understand it, be committed and thus not contain developer-specific stuff.

You can read more about configuration here. This includes prefixed environment variables. Note that the prefix can be empty.

@cmeeren cmeeren closed this as completed Feb 9, 2022
@cmeeren
Copy link
Owner

cmeeren commented Feb 9, 2022

In the reference YAML file, in the description for the configs property, I link to two official articles that explain all the configuration sources. So I believe this is explained well enough. Let me know if you still disagree.

# The optional 'configs' section allows you to specify where variables are resolved from.
# Each array item translates more or less exactly into a call to the corresponding
# Microsoft.Extensions.Configuration.ConfigurationBuilder.Add* method, in the order you
# specify here (i.e., later config sources will override already added config sources if
# there are collisions). Any config type may be added multiple times. This section is only
# required if you are using variables (e.g. for the connection string). For more
# information, see:
# - https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration
# - https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.configuration.configurationbuilder
configs:
# 'appSettings' allow you to use configuration values from appsettings.json.
- appSettings: path/from/project/to/appsettings.json
# 'userSecrets' allow you to use configuration values from user secrets.
- userSecrets: 80d5e7ec-f577-4360-b60a-f10ea004da1d
# 'envVars' allow you to use configuration values from environment varibles. Supply the
# prefix that environment variable names must start with. The prefix will be removed
# from the environment variable names.
- envVars: ""

@costa100
Copy link
Author

It's all good - like you said, it's in the MS documentation. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants