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

Allow a developer to remove the 'prod' stage text from bucket name. #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cartesive
Copy link

Having a stage name for test, dev, UAT, etc is great, but when you host a project using a CNAME domain for a nice project URL, the bucket name must match that domain name exactly.

Allowing the user to optionally specify a regex string removal of the (e.g.) prod stage name from the bucket name allows the developer to push the prod stage so the bucket name matches the client project's domain name, while still allowing dev, test, uat, etc. s3 endpoints.

Example

CartesiCreative:node_modules duncanjm$ sls client deploy -s dev
Serverless: Deploying client to stage "dev" in region "us-east-1"...  
Serverless: Finishing deployment...  
Serverless: Successfully deployed client to: dev.augrel.cartesive.com.s3-website-us-east-1.amazonaws.com  
1.amazonaws.com  
CartesiCreative:node_modules duncanjm$ sls client deploy -s prod
Serverless: Deploying client to stage "prod" in region "us-east-1"...  
Serverless: Finishing deployment...  
Serverless: Successfully deployed client to: augrel.cartesive.com.s3-website-us-east-1.amazonaws.com  

Now the user can go to dev at: http://dev.augrel.cartesive.com.s3-website-us-east-1.amazonaws.com

But also prod which EXACTLY matches the domain with CNAME forwarding:

http://augrel.cartesive.com

… name from the bucket name, so the bucket name matches the project domain.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant