DoSomething / bertly

🔗 A serverless link shortener.
https://dosome.click/wq544
MIT License
2 stars 1 forks source link

Rename production stage from 'dev' to 'prod'. #27

Closed DFurnes closed 6 years ago

DFurnes commented 6 years ago

Right now, we check against the current stage to determine whether or not to use a custom domain. Unfortunately, both our dev & production environment are named in the dev stage (by the STAGE tag in the Lambda function and the "Stages" config in API Gateway... perhaps elsewhere too).


For now, we can deploy by hacking serverless.yml before a prod deploy:

--- a/serverless.yml
+++ b/serverless.yml
@@ -21,7 +21,7 @@ custom:
     basePath: ''
     stage: ${self:provider.stage}
     createRoute53Record: true
-    enabled: ${self:custom.domainEnabled.${opt:stage, self:provider.stage}}
+    enabled: true

Then it's just sls --aws-profile serverless-production deploy (using the production access ID and secret key stored in Lastpass).

DFurnes commented 6 years ago

Whoops, closing in favor of #21!