Open kiwicopple opened 7 years ago
I recommend preact-cli / PR #11, lots of work done for serverless prerendering.
Am 01.06.2017 10:06 schrieb "Copple" notifications@github.com:
Hey, I'm really interested in the serverless set up - do you think you could include the terraform scripts in the repo or a gist? I tried following the instructions but got lost - I think the script will be a bit more explicit.
Great boilerplate btw
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BerndWessels/preact-redux-isomorphic/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AAepgoq3EnhV8GlviwsR_6jaxzZ4bO_7ks5r_nEHgaJpZM4NsoKJ .
@kiwicopple You can find a complete example with terraform infrastructure here.
It automatically builds the domain and complete infrastructure for it and the preact website in a Lambda with SSR and static resources in S3. Its live at wessels.nz
Let me know what you think and if you have any more questions.
This is a really great set of scripts, thanks @BerndWessels !!
Perhaps one more question - I have the cloudfront distro set up, but I'm getting errors when I try to access it via my website. I have Route53 Record Set with an Alias target that is equal to the cloudfront URL, but I can't quite figure it out.
I'll drop the full set of steps I took below, since I figure someone else may find them useful. My first time with terraform, it was quite enjoyable
terraform get
command later)terraform get
command later)cd platform-api
- this is the "master" terraformterraform get
- this will pull down all the required submodules for the master terraformprod.tfvars
that has the terraform vars (example below) terraform apply -var-file="prod.tfvars"
/Path/to/preact-redux-isomorphic/dist/client/*
into the newly created bucket in a subfolder _
domain_certificate_arn = "arn:aws:acm:us-east-1:XXXX:certificate/XXX-XX-XXX-XXX"
domain_name = "app.yourdomain.com"
region = "ap-southeast-1"
stage_description = "Production website"
stage_name = "live"
website_lambda_filename = "/Path/to/preact-redux-isomorphic/dist/Archive.zip"
website_lambda_role_arn = "arn:aws:iam::XXXX:role/service-role/XXXXNAME"
Looks like it may have resolved itself. Perhaps just a propagation issue - feel free to close this one off
Hey, I'm really interested in the serverless set up - do you think you could include the terraform scripts in the repo or a gist? I tried following the instructions but got lost - I think the script will be a bit more explicit.
Great boilerplate btw