Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Extracted all APIs to configuration variables #91

Closed

Conversation

architectt1
Copy link
Contributor

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.

@vikasrohit
Copy link

@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.
So, please keep the full URLs of the services as env variables.

@architectt1
Copy link
Contributor Author

@vikasrohit I understand, thanks for clarifying that. I committed the changes you asked.

@vikasrohit
Copy link

Thanks @architectt1

@gondzo
Copy link
Collaborator

gondzo commented Jul 20, 2018

@vikasrohit this requires adding env variables so you can merge this once they are ready in dev/prod

@vikasrohit
Copy link

@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

@gondzo
Copy link
Collaborator

gondzo commented Jul 23, 2018

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

@vikasrohit
Copy link

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.

@vikasrohit
Copy link

vikasrohit commented Aug 6, 2018

@gondzo are we done with changes in deploy.sh and circleci config? Please note that we have now migrated to the circleci 2.

@vikasrohit
Copy link

@gondzo as follow up, do you know where are we with this PR?

@gondzo
Copy link
Collaborator

gondzo commented Jan 28, 2019

done @vikasrohit these variables are added to deploy.sh and circleci
API_URL_PROJECTS: http://localhost:3001/v4/projects
API_URL_MEMBERS: http://localhost:3001/v3/members
API_URL_USERS: http://localhost:3001/v3/users
API_URL_AUTHORIZATIONS: http://localhost:3001/v3/authorizations
API_URL_TOPICS: http://localhost:3001/v5/topics

@gondzo
Copy link
Collaborator

gondzo commented Jan 28, 2019

I pushed to wrong branch by mistake. closing this PR and continuing in #100

@gondzo gondzo closed this Jan 28, 2019
@vikasrohit
Copy link

Thanks @gondzo

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

Successfully merging this pull request may close these issues.

3 participants