DefangLabs / samples

Samples to show you how to create and deploy apps with Defang.
1 stars 2 forks source link

Warning in nodejs-http sample and mismatched service name #113

Closed Prakash-Sundaresan closed 4 months ago

Prakash-Sundaresan commented 5 months ago

For the nodejs-http sample , I get a warning prakash.sundaresan@MacBook-Air-6 nodejs-http % defang compose up WARNING /Users/prakash.sundaresan/Defang/nodejs-http/compose.yaml: version is obsolete

Also, would be good if the name of the service created matches the name of the sample. In this case, the sample is called nodejs-http, but the service created is “minimal”

lionello commented 4 months ago

Versions were removed in #111. That fixed the warning. Naming is not easy to solve. It's a problem of "project" vs "service". For many projects with a single service, it might seem that the service should be named after the project, but the service name should represent the function the service has, eg. frontend, backend, web, etc. What's missing in Playground is project support, so you can see project names in the portal, tracked by https://github.com/DefangLabs/defang/issues/360.

Prakash-Sundaresan commented 4 months ago

I think the naming issue was mis-understood. My original issue was that the sample itself is defining a service (in the compose file) unintuitively called 'minimal' or 'service1'. My point is we should change all the samples so that they create services named after the sample, otherwise it is confusing.

raphaeltm commented 4 months ago

I removed last couple references to service1 in content and in the pulumi sample.

Largely closed by PR #108