Skip to content
This repository has been archived by the owner on Jan 30, 2019. It is now read-only.

Allow static apps to be hosted on Soapbox #138

Open
MickinSahni opened this issue Aug 29, 2017 · 2 comments
Open

Allow static apps to be hosted on Soapbox #138

MickinSahni opened this issue Aug 29, 2017 · 2 comments

Comments

@MickinSahni
Copy link
Contributor

MickinSahni commented Aug 29, 2017

Problem: As is the case with dynamic apps, owners of static apps require hosting solutions so that they may build and deploy their apps.

*From roadmap:* Initial approach: repo + a dockerfile (that includes all depdencies e.g. jekyll, hugo) Tasks: creates cloudfront distribution + S3 bucket when creating an app; run docker, copy to s3, invalidate cache

Application Provision

  • Rails application should offer option to specify static application on creation
  • CreateApplicaiton has a function that run static terraform
  • Terraform template for static application infrastructure - Issue: Terraform template for static application infrastructure #140
    • Terraform provisions in AWS
      • Route53 zone
      • CloudFront
      • S3 bucket

Application Deploy

  • Assets are built for commit sha and uploaded to s3
  • Update CloudFront distribution for blue environment by removing S3 bucket CNAME from Alternative Domain Names
  • Update CloudFront distribution for green environment by adding S3 bucket CNAME to Alternative Domain Names
  • Update Route53 A Alias record with CloudFront distribution Domain Name from green environment
@malford
Copy link

malford commented Aug 29, 2017

@paulsmith I have added some subtasks here for soapbox to provision a static application. Let me know if anything is missing.

@paulsmith
Copy link
Contributor

@malford Looks good. So there would be an a and a b S3 bucket for each app, at any time one or the other is blue or green? Makes sense to me.

One implementation thought: user's supplied Dockerfile should encapsulate building their site, and when we do a docker run, we pass in a volume (using the --mount flag) that is the target root of what the site generator should output to. In other words, the user should set up there site generator to output to a known directory local in the container (like /site, perhaps -- maybe inject as a env var $SITE_OUTPUT_DIR or something), that is mapped to the directory controlled by the Soapbox building process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants