【发布时间】:2023-03-02 23:36:02
【问题描述】:
我有一个应用程序的前端部分是用 React 编写的。这个应用程序以多阶段图像构建的方式构建工件(具体是 bundle.js 文件):
from node:8 as builder
# build the bundle.js file
...
from nginx
# serve the bundle.js file
...
这样我的图像非常小,里面只有 bundle.js 文件。
为了提供 bundle.js 文件,我想将此工件推送到 Google Cloud Storage 存储桶并在其上启用 CDN。这样做的最佳做法是什么?
应用程序的后端将使用 Skaffold、Container Builder 和 Kubernetes Engine。因此,如果可能的话,最好将 Container Builder 用于前端。
【问题讨论】:
标签: docker google-cloud-platform cdn google-kubernetes-engine