Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to custom the servicePath prop when running built-in commands #6727

Open
hoang-innomize opened this issue Sep 24, 2019 · 5 comments
Open

Comments

@hoang-innomize
Copy link

This is a Feature Proposal

I wanted to custom the service path when running built-in serverless commands such as deploy, package. Right now, it always set to .serverless

Description

  • I had a mono-repo that contains some micro-services written in TypeScript, each micro-service has it own serverless.yml file
  • Then when running any serverless command, I will have to provide --config option i.e. sls package --config /users/serverless.yml. Since we use serverless-webpack plugin to bundle the TS files so if we run the serverless command inside each service directory, we will get an error
  • I wanted to build multiple services parallel to speed up my deployment time, however, if I run same serverless command i.e. package some files created by package command will be overridden because it writes to the same directory which is .serverless.
  • The package command currently writes the files to the .serverless directory then move to target package directory (use --package package-dir option)

So my question is how can change the default service path .serverless (the value of serverless.config.servicePath property)?

image

Similar or dependent issues:

@hoang-innomize
Copy link
Author

Here is an error sometimes occurs when running package command parallel for multiple services

Serverless: Bundling with Webpack...
Serverless: Bundling with Webpack...
   28 modules
   34 modules
Serverless: Package lock found - Using locked versions
Serverless: Packing external modules: ....
Serverless: Package lock found - Using locked versions
Serverless: Packing external modules: .....
Serverless: Packaging service...
Serverless: Packaging service...
 
  Error --------------------------------------------------
 
  Error: ENOENT: no such file or directory, open '.serverless/users-service.zip'
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

@hoang-innomize
Copy link
Author

I really need this issue to be fixed, is there anyone can help me out?

@ThomasAribart
Copy link
Contributor

@pmuens any news on this issue ? I also have the problem on my project

@CompleteScone
Copy link

Giving this another poke. Would love to have something like this available.

@chaoyangnz
Copy link

so muh painful for parallel deployment and monorepo, please please save us!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants