serverless / compose

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

Basepath over whole serverless compose project #178

Open RickVerkuijlen opened 1 year ago

RickVerkuijlen commented 1 year ago

Is there an existing issue for this?

Use case description

I'm using serverless compose over multiple projects. All these project communicate with each other through API requests. Some of the endpoints are similar over the different projects. With serverless compose, I want to prefix all the services within the compose with an endpoint.

Proposed solution (optional)

It would be nice if its possible that in the serverless-compose.yml, we can add something like basepath: {PREFIX}. This could result in all the services within that compose file having that prefix.

RickVerkuijlen commented 1 year ago

I've came across an issue that has to do with this. I'll try to explain it. In service A, I have the endpoint /tenant. In service B, I have the endpoint /tenant/{tenantId}. Lets say I want to deploy service A before I want to deploy service B. Service A is deployed, and the endpoint /tenant is created. When I want to deploy service B, it complains about the parent (/tenant) already existing. It would be nice if the ID of the parent can be recognized automatically.