serverless / compose

Orchestrate Serverless Framework in monorepos
https://serverless.com/framework/docs/guides/compose
MIT License
110 stars 15 forks source link

Loosen Restriction on Path #183

Open jonioni opened 1 year ago

jonioni commented 1 year ago

Is there an existing issue for this?

Use case description

Related: #32

Is it possible to loosen the restriction of the path check? Currently we have more than one serverless config files under the same module root and the restriction on same path makes our codebase incompatible with the compose feature. For instance we have services of same path but different config, e.g.

a-x:
  path: a
  config: x.yml
a-y:
  path: a
  config: y.yml
  dependsOn: a-x

Since it already enables specifying config:, it would be great to support same path: as well.

Any other suggestion would be appreciated. Preferring the ones that don't require a large code base restructuring.

Proposed solution (optional)

Enable specifying service of same path (but different config).

If this is non-straightforward due to the use of single serverless state of the framework itself, then could the check take into account the dependency, i.e. allow same path if there's dependency relation between the checked services?