u i l d i n g i n f r a s t r u c t u re 1. Create S3 Bucket 2. Create CloudFront OAI 3. Configure Bucket Policy 4. Configure CloudFront Distribution 5. Create CloudFront Distribution ෳ C o m p l i c a t e d
$ aws s3 sync build s3://[BUCKET_NAME] upload: build/index.html to s3://BUCKET_NAME/index.html upload: build/184e3117cf2cd3fa28a1f654dc5d4785.js to s3:// BUCKET_NAME/184e3117cf2cd3fa28a1f654dc5d4785.js Add the following option not to cache in development --cache-control "no-store, no-cache”
$ gcloud app deploy Services to deploy: descriptor: […] source: […] target project: [PROJECT_NAME] target service: [default] target version: [20180222t003136] target url: [https://PROJECT_NAME.appspot.com] Do you want to continue (Y/n)? D o n o t f o rg e t p ro j e c t - s w i t c h i n g
want to setup… ̋ Database: Deploy Firebase Realtime Database Rules ̋ Firestore: Deploy rules and create indexes for Firestore ̋ Functions: Configure and deploy Cloud Functions ›‒ Hosting: Configure and deploy Firebase Hosting sites ̋ Storage: Deploy Cloud Storage security rules ? Select a default Firebase project for this directory: [don't setup a default project] › [create a new project] ? What do you want to use as your public directory? public ? Configure as a single-page app (rewrite all urls to /index.html)? Yes A u t o c o n f i g u r a t i o n f o r S PA
‘PROJECT_NAME'... i deploying hosting i hosting: preparing build directory for upload... ✔ hosting: 2 files uploaded successfully ✔ Deploy complete! Project Console: https://console.firebase.google.com/project/ PROJECT_NAME/overview Hosting URL: https://PROJECT_NAME.firebaseapp.com E a s y
Easy CDN cache control and immediate provisioning. • Configuring custom domain is also easy and cert is full-managed. Cons • Necessary to visit web console in construction procedure. • No access control system. • Cannot manage with tools such as Terraform.