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 for Custom Accessory Service Name #506

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

rience
Copy link
Contributor

@rience rience commented Sep 30, 2023

In my company we deploy several applications to single vm. They all share accessories - Postgres, Redis. Unfortunately at the moment - service name for accessory is created by concatenating deployment app name with name of accessory. So if I deploy app1 and then app2 - I would end up with two Postgres instances - app1-postgres and app2-postgres. Because of that we have separate YAML file - only for managing accessories.

This PR adds service setting to accessory - and that allows for custom service name. Of course previous behaviour stays - this is optional.

EDIT: I believe it could also help with this discussion: #257

Copy link
Contributor

@igor-alexandrov igor-alexandrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thank you.

@@ -8,7 +8,7 @@ def initialize(name, config:)
end

def service_name
"#{config.service}-#{name}"
specifics['service'] || "#{config.service}-#{name}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use double quotes for strings.

@rience rience force-pushed the custom-acc-service-name branch from 89e5bcc to ca078c5 Compare February 15, 2024 09:25
@igor-alexandrov
Copy link
Contributor

@rience can you please check locally, what test does not pass?

@rience rience force-pushed the custom-acc-service-name branch from ca078c5 to b411356 Compare February 15, 2024 10:12
@djmb djmb merged commit 200e268 into basecamp:main Mar 4, 2024
7 checks passed
@rience rience deleted the custom-acc-service-name branch March 25, 2024 08:10
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

Successfully merging this pull request may close these issues.

3 participants