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

Allow configuration of application deployment name #4

Closed
greemo opened this issue May 25, 2022 · 3 comments
Closed

Allow configuration of application deployment name #4

greemo opened this issue May 25, 2022 · 3 comments

Comments

@greemo
Copy link

greemo commented May 25, 2022

Problem

At the moment the deployment name is always "main". I want to be able to configure that.

Suggested solution

Add 'deployment' field to ApplicationConfig and Application, and use it in resolveConfig() instead of the hard-coded 'main'.

then a user could configure the deployment within configureWunderGraphApplication()

Alternatives

Possibly allow overriding via an environment variable.

Additional context

const name = 'main';

export interface ApplicationConfig {

@jensneuse
Copy link
Member

jensneuse commented May 25, 2022

You're right that this should be configurable. I think, a good place could be the Application object:

We could add a properly like "environment" or "deployment" that defaults to the currently checked out branch, if not set. Otherwise, it could be overwritten via string. But I'm not yet 100% sure. Need to discuss within the team. What's your opinion on this?

@greemo
Copy link
Author

greemo commented May 25, 2022

Yeah, adding it to the ApplicationConfig that is used to construct the Application feels like a natural place for it.

I think defaulting to branch may make deployment a bit tricky, as it affects the url.

I'd feel more comfortable with default to 'main' as it is, but can be overwritten by the applicationconfig.

It may make sense for the go server+hook server to consider an environment variable as well.

@stale
Copy link

stale bot commented Jul 25, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale label Jul 25, 2022
@stale stale bot closed this as completed Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants