Hello, is there a way to support multiple environments with the new serverless component? We've upgraded and used to pass env vars to serverless.yml which no longer seems to be an option.
@justinwhall Would this https://github.com/serverless/components#environment-variables help?
I'm not sure. I'm familiar with passing env vars to the serverless.yml but I'm not certain where they would go with the update?
Components are a new concept to me. Perhaps I'm missing something here but as far as the serverless.yml config goes, I'm not certain how both generate or conditionally deploy to different components β or perhaps that wrong terminology. Same component but different Apps.
What I'm after here is a way to build/deploy different environments something like sls deploy --env=stage
Does that make sense?
I suppose this is what I'm looking for. Does this package support something like:
myApp:
component: serverless-next.js
inputs:
code: ../
With a directory structure like:
code/prod
code/test
Edit: Ok, no. I see the docs on inputs now.
Hi,
how could i manage different stages, specifying different cloudfront distributions, buckets and lamba for each stage?
Hi folks, I've just released @1.3.0 which adds support for custom app directory paths (see here nextConfigDir). Credits to @jayarnielsen for implementing π
I'm closing the issue as you should now be able to do something like:
β next.config.js
β
ββββpages
β β index.js
β β users.js
β β ...
β
ββββdev
β serverless.yml
ββββprod
β serverless.yml
# dev/serverless.yml
myNextApp:
inputs:
domain: [ "dev", "myapp.com" ]
nextConfigDir: "../"
Most helpful comment
Hi folks, I've just released
@1.3.0which adds support for custom app directory paths (see herenextConfigDir). Credits to @jayarnielsen for implementing πI'm closing the issue as you should now be able to do something like: