defang icon indicating copy to clipboard operation
defang copied to clipboard

Service names and dns

Open raphaeltm opened this issue 1 year ago • 3 comments

We need to document the fact that service names get converted to kebab-case. My instinct would be to throw an error if they aren't, but I guess that's not necessarily practical.

Right now if someone has postgres_service as a service name, it gets translated into postgres-service in DNS, which makes sense, but they might not be aware of if they're used to the way docker compose works, which allows the underscores. We can do replacement for things that are visible in env in the compose file, but if someone puts that elsewhere, then it won't be automatically replaced (I can imagine a situation where someone has a dev/staging/prod config file and uses env vars to select the file for example)

raphaeltm avatar Sep 04 '24 23:09 raphaeltm

We need to document the fact that service names get converted to kebab-case. My instinct would be to throw an error if they aren't, but I guess that's not necessarily practical.

Right now if someone has postgres_service as a service name, it gets translated into postgres-service in DNS, which makes sense, but they might not be aware of if they're used to the way docker compose works, which allows the underscores. We can do replacement for things that are visible in env in the compose file, but if someone puts that elsewhere, then it won't be automatically replaced (I can imagine a situation where someone has a dev/staging/prod config file and uses env vars to select the file for example)

Definitely +1 on this! I was actually surprised to see this normalization happen when I was running the CLI command for defang deploy.

This is a really good caveat to note explicity and agree with your line of thinking here @raphaeltm 😄 🤓

VeVarunSharma avatar Sep 30 '24 00:09 VeVarunSharma

Thanks @ve-varun-sharma ! How are you finding things so far? Are you open to hopping on a call?

raphaeltm avatar Sep 30 '24 00:09 raphaeltm

Thanks @ve-varun-sharma ! How are you finding things so far? Are you open to hopping on a call?

Pretty good so far! Though I'd get familiar with the code base and poke around the issues and put some tiny PRs up :)

Would love to hop on a call! Coordinate via whatsApp/email? :)

VeVarunSharma avatar Sep 30 '24 02:09 VeVarunSharma