-
Notifications
You must be signed in to change notification settings - Fork 5
Extracted all APIs to configuration variables #91
Extracted all APIs to configuration variables #91
Conversation
@architectt1 thanks for the PR. I think its good approach to have only path's of the services to be extracted as env variables, however, we would not like to do that right now because we are not following that pattern in any of our services and if we do these changes for this service only, it might confuse other team members when they want to change the env variables. |
… each service's url.
@vikasrohit I understand, thanks for clarifying that. I committed the changes you asked. |
Thanks @architectt1 |
@vikasrohit this requires adding env variables so you can merge this once they are ready in dev/prod |
@gondzo Could you please do the required changes in https://github.com/architectt1/tc-connect-notifications/blob/3302c593f3d8686ee1785fbf3371212016ac6848/deploy.sh so that circle ci can inject the new env variables in the constants? I would add them to circle ci once we have them in deploy.sh |
Looking more into this - the new config values are just API urls with correct default values for dev and prod. Do we need to override them via env vars at all? If not, we can just merge this without any changes in deploy.sh or circleci |
Agree that as it has all values for all environments already in config files, I would like to get them in deploy.sh and circle ci both so that we have the option of overriding them without code commit. |
@gondzo are we done with changes in deploy.sh and circleci config? Please note that we have now migrated to the circleci 2. |
@gondzo as follow up, do you know where are we with this PR? |
done @vikasrohit these variables are added to deploy.sh and circleci |
I pushed to wrong branch by mistake. closing this PR and continuing in #100 |
Thanks @gondzo |
Solves #84.
A note about the taken approach. Instead of having the base url present in all URLs, we just save the services' paths under configuration, and in code we append both. This way children configs (
production.json
/development.json
) can just override the base url and everything will work correctly.