Uncharted
04/20/2021, 10:11 AMnpx sst deploy --myParameters myValue
Frank
serverless-parameters
plugin?Uncharted
04/20/2021, 7:50 PMUncharted
04/20/2021, 7:53 PMFrank
Frank
Uncharted
04/21/2021, 6:01 AMdomain:
local: ${self:custom.login}.<http://mycompany.io|mycompany.io>
and our developers could type the command
sls deploy --stage dev --login mylogin
you may want some flexibility to provision your infra depending of some cli options
for example the size of your cluster etc
from what I read the only options available is to use the environment variables and properties files per environment ?Frank
.env
support in v0.13.0, so you can define stage specific configs (ie. domain and other infra settings) like this:
# .env.dev
DOMAIN=<http://dev.mycompany.io|dev.mycompany.io>
# .env.prod
DOMAIN=<http://prod.mycompany.io|prod.mycompany.io>
And a developer can override it with their personal config:
# .env.local
DOMAIN=<http://frank.mycompany.io|frank.mycompany.io>
And in the code, you can reference it like:
process.env.DOMAIN
Frank
$ DOMAIN=<http://frank.mycompany.io|frank.mycompany.io> sst start
Frank
Frank