PageSourceSearch

https://answeragent.ai/assets/js/e2d8295e.ed5283a3.js

js answeragent.ai collected 2026-10-02 01:11:34 UTC 10,544 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4303],{8667:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>t});var r=s(22155);const l={},o=r.createContext(l);function i(e){const n=r.useContext(o);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:i(e.components),r.createElement(o.Provider,{value:n},e.children)}},42030:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"developers/deployment/gcp","title":"GCP","description":"Learn how to deploy Flowise on GCP","source":"@site/docs/developers/deployment/gcp.md","sourceDirName":"developers/deployment","slug":"/developers/deployment/gcp","permalink":"/docs/developers/deployment/gcp","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"description":"Learn how to deploy Flowise on GCP"},"sidebar":"docs","previous":{"title":"Azure","permalink":"/docs/developers/deployment/azure"},"next":{"title":"Render","permalink":"/docs/developers/deployment/render"}}');var l=s(65723),o=s(8667);const i={description:"Learn how to deploy Flowise on GCP"},t="GCP",c={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Setup Kubernetes Cluster",id:"setup-kubernetes-cluster",level:2},{value:"Build and Push the Docker image",id:"build-and-push-the-docker-image",level:2},{value:"Deployment to GCP",id:"deployment-to-gcp",level:2}
1,{value:"Congratulations!",id:"congratulations",level:2},{value:"Timeout",id:"timeout",level:2}];function a(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",header:"header",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.header,{children:(0,l.jsx)(n.h1,{id:"gcp",children:"GCP"})}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsx)(n.li,{children:"Notedown your Google Cloud [ProjectId]"}),"\n",(0,l.jsxs)(n.li,{children:["Install ",(0,l.jsx)(n.a,{href:"https://git-scm.com/book/en/v2/Getting-Started-Installing-Git",children:"Git"})]}),"\n",(0,l.jsxs)(n.li,{children:["Install the ",(0,l.jsx)(n.a,{href:"https://cloud.google.com/sdk/docs/install-sdk",children:"Google Cloud CLI"})]}),"\n",(0,l.jsxs)(n.li,{children:["Install ",(0,l.jsx)(n.a,{href:"https://docs.docker.com/desktop/",children:"Docker Desktop"})]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"setup-kubernetes-cluster",children:"Setup Kubernetes Cluster"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsx)(n.li,{children:"Create a Kubernetes Cluster if you don't have one."}),"\n"]}),"\n",(0,l.jsxs)("figure",{children:[(0,l.jsx)("img",{src:"/.gitbook/assets/gcp/1.png",alt:""}),(0,l.jsx)("figcaption",{children:(0,l.jsxs)("p",{children:["Click ",(0,l.jsx)(n.code,{children:"Clusters"})," to create one."]})})]}),"\n",(0,l.jsxs)(n.ol,{start:"2",children:["\n",(0,l.jsxs)(n.li,{children:["Name the Cluster, choose the right resource location, use ",(0,l.jsx)(n.code,{children:"Autopilot"})," mode and keep all other default configs."]}),"\n",(0,l.jsx)(n.li,{children:"Once the Cluster is created, Click the 'Connect' menu from the actions menu"}),"\n"]}),"\n",(0,l.jsxs)("figure",{children:[(0,l.jsx)("img",{src:"/.gitbook/assets/gcp/2.png",alt:""}),(0,l.jsx)("figcaption",{})]}),"\n",(0,l.jsxs)(n.ol,{start:"4",children:["\n",(0,l.jsx)(n.li,{children:"Copy the command and paste into your terminal and hit enter to connect your cluster."}),"\n",(0,l.jsxs)(n.li,{children:["Run the below command and select correct context name, which looks like ",(0,l.jsx)(n.code,{children:"gke_[ProjectId]_[DataCenter]_[ClusterName]"})]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"kubectl config get-contexts\n"})}),"\n",(0,l.jsxs)(n.ol,{start:"6",children:["\n",(0,l.jsx)(n.li,{children:"Set the current context"}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"kubectl config use-context gke_[ProjectId]_[DataCenter]_[ClusterName]\n"})}),"\n",(0,l.jsx)(n.h2,{id:"build-and-push-the-docker-image",children:"Build and Push the Docker image"}),"\n",(0,l.jsx)(n.p,{children:"Run the following commands to build and push the Docker image to GCP Container Registry."}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsx)(n.li,{children:"Clone the Flowise"}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"git clone https://github.com/FlowiseAI/Flowise.git\n"})}),"\n",(0,l.jsxs)(n.ol,{start:"2",children:["\n",(0,l.jsx)(n.li,{children:"Build the Flowise"}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"cd Flowise\r\npnpm install\r\npnpm build\n"})}),"\n",(0,l.jsxs)(n.ol,{start:"3",children:["\n",(0,l.jsxs)(n.li,{children:["Update the ",(0,l.jsx)(n.code,{children:"Dockerfile"})," file a little."]}),"\n"]}),"\n",(0,l.jsxs)(n.blockquote,{children:["\n",(0,l.jsx)(n.p,{children:"Specify the platform of nodejs"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"FROM --platform=linux/amd64 node:18-alpine\n"})}),"\n",(0,l.jsx)(n.p,{children:"Add python3, make and g++ to install"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"RUN apk add --no-cache python3 make g++\n"})}),"\n"]}),"\n",(0,l.jsxs)(n.ol,{start:"3",children:["\n",(0,l.jsx)(n.li,{children:"Build as Docker image, make sure the Docker desktop app is running"}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"docker build -t gcr.io/[ProjectId]/flowise:dev .\n"})}),"\n",(0,l.jsxs)(n.ol,{start:"4",children:["\n",(0,l.jsx)(n.li,{children:"Push the Docker image to GCP container registry."}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"docker push gcr.io/[ProjectId]/flowise:dev\n"})}),"\n",(0,l.jsx)(n.h2,{id:"deployment-to-gcp",children:"Deployment to GCP"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["Create a ",(0,l.jsx)(n.code,{children:"yamls"})," root folder in the project."]}),"\n",(0,l.jsxs)(n.li,{children:["Add the ",(0,l.jsx)(n.code,{children:"deployment.yaml"})," file into that folder."]}
1),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'# deployment.yaml\r\napiVersion: apps/v1\r\nkind: Deployment\r\nmetadata:\r\n  name: flowise\r\n  labels:\r\n    app: flowise\r\nspec:\r\n  selector:\r\n    matchLabels:\r\n      app: flowise\r\n  replicas: 1\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: flowise\r\n    spec:\r\n      containers:\r\n      - name: flowise\r\n        image: gcr.io/[ProjectID]/flowise:dev\r\n        imagePullPolicy: Always\r\n        resources:\r\n          requests:\r\n            cpu: "1"\r\n            memory: "1Gi"\n'})}),"\n",(0,l.jsxs)(n.ol,{start:"3",children:["\n",(0,l.jsxs)(n.li,{children:["Add the ",(0,l.jsx)(n.code,{children:"service.yaml"})," file into that folder."]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'# service.yaml\r\napiVersion: "v1"\r\nkind: "Service"\r\nmetadata:\r\n  name: "flowise-service"\r\n  namespace: "default"\r\n  labels:\r\n    app: "flowise"\r\nspec:\r\n  ports:\r\n  - protocol: "TCP"\r\n    port: 80\r\n    targetPort: 3000\r\n  selector:\r\n    app: "flowise"\r\n  type: "LoadBalancer"\r\n\n'})}),"\n",(0,l.jsx)(n.p,{children:"It will be look like below."}),"\n",(0,l.jsxs)("figure",{children:[(0,l.jsx)("img",{src:"/.gitbook/assets/gcp/3.png",alt:""}),(0,l.jsx)("figcaption",{})]}),"\n",(0,l.jsxs)(n.ol,{start:"4",children:["\n",(0,l.jsx)(n.li,{children:"Deploy the yaml files by running following commands."}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"kubectl apply -f yamls/deployment.yaml\r\nkubectl apply -f yamls/service.yaml\n"})}),"\n",(0,l.jsxs)(n.ol,{start:"5",children:["\n",(0,l.jsxs)(n.li,{children:["Go to ",(0,l.jsx)(n.code,{children:"Workloads"})," in the GCP, you can see your pod is running."]}),"\n"]}),"\n",(0,l.jsxs)("figure",{children:[(0,l.jsx)("img",{src:"/.gitbook/assets/gcp/4.png",alt:""}),(0,l.jsx)("figcaption",{})]}),"\n",(0,l.jsxs)(n.ol,{start:"6",children:["\n",(0,l.jsxs)(n.li,{children:["Go to ",(0,l.jsx)(n.code,{children:"Services & Ingress"}),", you can click the ",(0,l.jsx)(n.code,{children:"Endpoint"})," where the Flowise is hosted."]}),"\n"]}),"\n",(0,l.jsxs)("figure",{children:[(0,l.jsx)("img",{src:"/.gitbook/assets/gcp/5.png",alt:""}),(0,l.jsx)("figcaption",{})]}),"\n",(0,l.jsx)(n.h2,{id:"congratulations",children:"Congratulations!"}),"\n",(0,l.jsxs)(n.p,{children:["You have successfully hosted the Flowise apps on GCP ",(0,l.jsx)(n.a,{href:"https://emojipedia.org/partying-face/",children:"\ud83e\udd73"})]}),"\n",(0,l.jsx)(n.h2,{id:"timeout",children:"Timeout"}),"\n",(0,l.jsx)(n.p,{children:"By default, there is a 30 seconds timeout assigned to the proxy by GCP. This caused issue when the response is taking longer than 30 seconds threshold to return. In order to fix this issue, make the following changes to YAML files:"}),"\n",(0,l.jsx)(n.p,{children:"Note: To set the timeout to be 10 minutes (for example) -- we specify 600 seconds below."}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["Create a ",(0,l.jsx)(n.code,{children:"backendconfig.yaml"})," file with the following content:"]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-yaml",children:"apiVersion: cloud.google.com/v1\r\nkind: BackendConfig\r\nmetadata:\r\n    name: flowise-backendconfig\r\n    namespace: your-namespace\r\nspec:\r\n    timeoutSec: 600\n"})}),"\n",(0,l.jsxs)(n.ol,{start:"2",children:["\n",(0,l.jsxs)(n.li,{children:["Issue: ",(0,l.jsx)(n.code,{children:"kubectl apply -f backendconfig.yaml"})]}),"\n",(0,l.jsxs)(n.li,{children:["Update your ",(0,l.jsx)(n.code,{children:"service.yaml"})," file with the following reference to the ",(0,l.jsx)(n.code,{children:"BackendConfig"}),":"]}),"\n"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-yaml",children:'apiVersion: v1\r\nkind: Service\r\nmetadata:\r\n    annotations:\r\n        cloud.google.com/backend-config: \'{"default": "flowise-backendconfig"}\'\r\n    name: flowise-service\r\n    namespace: your-namespace\n'})}),"\n",(0,l.jsxs)(n.ol,{start:"4",children:["\n",(0,l.jsxs)(n.li,{children:["Issue: ",(0,l.jsx)(n.code,{children:"kubectl apply -f service.yaml"})]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.