-
-
Notifications
You must be signed in to change notification settings - Fork 460
CNAMEAlreadyExists #288
Comments
Are you committing your application state in source control? That is the files under the .serverless directory. If don’t, Ci will create a new Cloudfront in every build. |
@gamribeiro sorry, Should I commit this folder? I didn't find any information in the documentation about how we have to work with the CI tools. I'm using other serverless components and it doesn't need to commit anything related to the serverless. Also reviewing the configuration in the |
In the documentation they tell us: CI/CD] A new CloudFront distribution is created on every CI build. I wasn't expecting that: .serverless directory is where they keep it your application state. Try to:
After that, you can try to do not delete .serverless and rebuild your application. It will only updated your assets and not try to create a new cloudfront. |
@gamribeiro thanks, well I tried some stuff yesterday and I had an issue creating the same app with different subdomains keeping the .serveless folder. Is this an expected behavior? For the hand I will try your advice, but I think before I have to remove all resources inside in AWS. I will leave comments later. |
It seems bad practice to have to commit |
Yes
Seems there is an issue with the cloudformation limits #17 |
We deploy purely from CI too, store the state in an S3 bucket Get state from S3 -> build and deploy -> update the state in S3 We use |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Updated CI/CD / multi-stage deployment FAQs here: https://github.com/serverless-nextjs/serverless-next.js#cicd-multi-stage-deployments--a-new-cloudfront-distribution-is-created-on-every-ci-build-i-wasnt-expecting-that. Yes, the DX can be better especially for CI/CD use, I think we should integrate it in the component using AWS S3 buckets to store state or with new serverless components version (I use the former, haven't read up much on the latter yet). I will consider how to do this. |
Describe the bug
When the CI deploying the app I'm receiving this issue
To Reproduce
actually I don't know how to reproduce
Expected behavior
Deploy the app
The text was updated successfully, but these errors were encountered: