serverless / compose

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

Ability to point directly to serverless.yml config files in the same folder #153

Open arondeparon opened 1 year ago

arondeparon commented 1 year ago

Is there an existing issue for this?

Use case description

I don't really work on monorepos with lots of services, but I do like to split my deployments into several pieces (serverless-vpc.yml, serverless-rds.yml, serverless-backend.yml, etc...).

Currently, I keep these files in the root folder and deploy them individually.

I tried adding these files to serverless-compose.yml but it seems that this is not possible because they don't live in subfolders.

Is there some way to do this already?

Proposed solution (optional)

No response

mnapoli commented 1 year ago

Hi Aron, this is indeed not supported for the same reason as for multi-region deployments. You can find a low-level explanation here: https://www.serverless.com/framework/docs/guides/compose#faq

stephenbawks commented 1 year ago

I have done multi-region by having separate folders. You would obviously need to have your serverless.yml file in both folders:

/baseInfrastructure-E2

/baseInfrastructure-W2

In the serverless.yml file, just need to specify the correct region.

Hideman85 commented 1 year ago

Same need here, and actually config is not really supported is it? 🤔

services:
  backend-lambdas:
    path: ${sls:stage}-lambdas
    config: serverless-lambdas.yml
  backend-appsync:
    path: ${sls:stage}-appsync
    config: serverless-appsync.yml
    params:
      lambdaNamePrefix: ${backend-lambdas.lambdaNamePrefix}

Error:
The "--config" option is not supported (yet) in Serverless Framework Compose
You can search and/or open feature requests here: https://github.com/serverless/compose'