Serverless/Stateless deploy (Google Cloud Run)

I’ve just discovered Appsmith and I’m really intrigued. It looks great for rapid prototyping of admin applications. We are currently running most of our applications on Google Cloud Run which is a really great deployment option for stateless applications. So now my question is will Appsmith work on such a platform? I.e. with no access to persistent file system. From what I can tell by quickly glancing at the docker section of you documentation it looks like you make use of volumes. Are those critical for running Appsmith?

And lastly if Appsmith is not suitable to run on Cloud Run are there any plans to make so?

@matave Unfortunately, we don’t have any documentation around deploying Appsmith on Google Cloud Run. But looks like a couple of our users have tried out this route. Deploying in Google Cloud Run

Also looping in @sharat87 in case you have other queries

That was quick! Impressive responsiveness here! Thanks. I’ll just launch into testing it out myself on Cloud Run then. Will report back my findings here once I have anything worth sharing. :slightly_smiling_face:

1 Like

Deploying as such seems to go well. The container is successfully deployed but when I try to access I just get:

image

From the log:

Default
2022-03-30 17:57:16.225 CESTmongodb stdout |
Default
2022-03-30 17:57:16.225 CESTeditor stdout | Load environment configuration
Default
2022-03-30 17:57:16.225 CESTeditor stdout |
Default
2022-03-30 17:57:16.225 CESTeditor stdout | + http_conf=/opt/appsmith/templates/nginx-app-http.conf.template.sh
Default
2022-03-30 17:57:16.225 CESTeditor stdout | + https_conf=/opt/appsmith/templates/nginx-app-https.conf.template.sh
Default
2022-03-30 17:57:16.225 CESTeditor stdout | + APP_TEMPLATE=/opt/appsmith/templates/nginx-app-http.conf.template.sh
Default
2022-03-30 17:57:16.225 CESTeditor stdout | + [[ -n '' ]]
Default
2022-03-30 17:57:16.225 CESTeditor stdout | + bash /opt/appsmith/templates/nginx-app-http.conf.template.sh ''
Default
2022-03-30 17:57:16.225 CESTeditor stdout |
Default
2022-03-30 17:57:16.225 CESTeditor stdout | + index_html_served=/opt/appsmith/editor/index.html
Default
2022-03-30 17:57:16.225 CESTeditor stdout | + index_html_original=/opt/appsmith/index.html.original
Default
2022-03-30 17:57:16.225 CESTeditor stdout | + [[ ! -f /opt/appsmith/index.html.original ]]
Default
2022-03-30 17:57:16.225 CESTeditor stdout | + cp -v /opt/appsmith/editor/index.html /opt/appsmith/index.html.original
Default
2022-03-30 17:57:16.225 CESTeditor stdout |
Default
2022-03-30 17:57:16.225 CESTeditor stdout | '/opt/appsmith/editor/index.html' -> '/opt/appsmith/index.html.original'
Default
2022-03-30 17:57:16.225 CESTeditor stdout |
Default
2022-03-30 17:57:16.225 CESTeditor stdout | + node -e '
Default
2022-03-30 17:57:16.225 CESTeditor stdout | const fs = require("fs")
Default
2022-03-30 17:57:16.225 CESTeditor stdout | const content = fs.readFileSync("/opt/appsmith/index.html.original", "utf8").replace(
Default
2022-03-30 17:57:16.225 CESTeditor stdout | /\b__(APPSMITH_[A-Z0-9_]+)__\b/g,
Default
2022-03-30 17:57:16.225 CESTeditor stdout | (placeholder, name) => (process.env[name] || "")
Default
2022-03-30 17:57:16.225 CESTeditor stdout | )
Default
2022-03-30 17:57:16.225 CESTeditor stdout | fs.writeFileSync("/opt/appsmith/editor/index.html", content)
Default
2022-03-30 17:57:16.225 CESTeditor stdout | '
Default
2022-03-30 17:57:16.225 CESTeditor stdout |
Default
2022-03-30 17:57:16.225 CESTeditor stdout | + exec nginx -g 'daemon off;'
Default
2022-03-30 17:57:16.225 CESTeditor stdout |
Default
2022-03-30 17:57:16.225 CEST2022-03-30 15:57:15,725 INFO success: mongodb entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
Default
2022-03-30 17:57:16.225 CEST2022-03-30 15:57:15,725 INFO success: mongodb entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
Default
2022-03-30 17:57:16.226 CEST2022-03-30 15:57:16,225 INFO success: backend entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
Default
2022-03-30 17:57:16.226 CEST2022-03-30 15:57:16,225 INFO success: backend entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)

Any suggestions on what the problem might be? :pray:

Hey @matave, thanks for trying this out. Is it possible to get more logs? I don’t see anything off in the logs provided, but I don’t see any mention of the backend server running either, so I’m not sure if that component is running fine. The error you see in the screenshot usually shows up when either the backend server isn’t running, or when the routing to the backend server isn’t functional.

Matave,

would you be so kind as to show the google cloud run commands needed to push and run the image? Here is mine which sadly throws an error: