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

multiple sites for www redirect? #56

Open
trjstewart opened this issue May 15, 2018 · 9 comments
Open

multiple sites for www redirect? #56

trjstewart opened this issue May 15, 2018 · 9 comments

Comments

@trjstewart
Copy link

Is it possible to deploy multiple buckets within the one serverless.yml? For example, i'd like to be able to deploy domain.com with the client files and www.domain.com to redirect to domain.com or visa versa.

If this isn't supported currently I'd definately be interested in adding it as a feature if there is intrest.

@fernando-mc
Copy link
Owner

Hello @trjstewart. You're correct that this isn't currently supported, but we're always open to new contributions.

I believe you can setup a redirect from one bucket to another and then would only have to maintain a single bucket of files. There are additional things we could also add such as managing CloudFront distributions with the static sites. Happy to have any sort of PR on either.

I'll assign this to you - feel free to ask for help from anyone on the contributors or maintainers list in the Readme!

@romainquellec
Copy link

Hello @trjstewart, any update on this ?

@fernando-mc
Copy link
Owner

Hi @romainquellec! Feel free to help develop this too! I'll basically assign this issue to the first person who says they are working on developing the feature.

@trjstewart looks like there is community interest 😀! Let us know if you're interested in working on this.

@anthony-o
Copy link

For information, the base documentation for this is here: "Step 2.3: Configure Your Website Redirect".

@trjstewart trjstewart removed their assignment Oct 8, 2019
@rstittda
Copy link

rstittda commented Jan 23, 2020

@fernando-mc I have a working branch that deploys to multiple buckets. I've been testing against my own s3 buckets but not sure how to go about using yours before submitting a pull request?

@fernando-mc
Copy link
Owner

@rstittda That's great! Ahh darn, did I leave them already created again? We still need to fix some of those tests. You can put in a PR for this and I'll be happy to take a look at it.

@junjettrasmonte
Copy link

I was able to deploy to multiple buckets without any changes to this package.

client:
   bucketName: ${opt:client}-${opt:stage, 'dev'}.domain.tld
   distributionFolder: client/${opt:client}/dist
   indexDocument: index.html
   errorDocument: error.html

my file structure is

./serverless.yml
./client/client1/dist/
./client/client2/dist/
./client/client3/dist/

then to deploy

sls client deploy --stage dev --client client1
sls client deploy --stage dev --client client2
sls client deploy --stage dev --client client3

@bebbi
Copy link

bebbi commented Apr 13, 2021

@rstittda would your branch e ready for a PR? It looks like the solution proposed just above doesn't allow one regular site plus a redirect like OP mentioned.

@rstittda
Copy link

rstittda commented Apr 13, 2021 via email

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

7 participants