google-app-engine

NextJS on GAE - Error: EROFS: read-only file system

筅森魡賤 提交于 2021-01-07 07:04:20
问题 I'm trying to deploy a Next application with custom server.js into GAE. I can run the project with no problems on local and even on the google GCP CLI. The problem right now is after the app is deployed to GAE successfully via gcloud app deploy , I'm getting the following error when opening the app. 2020-03-30 21:41:21.748 HKT Error: EROFS: read-only file system, unlink '/srv/dist/functions/next/BUILD_ID' Expand all | Collapse all{ insertId: "5e81f701000b6ba4e770be02" labels: {…} logName:

NextJS on GAE - Error: EROFS: read-only file system

雨燕双飞 提交于 2021-01-07 07:03:54
问题 I'm trying to deploy a Next application with custom server.js into GAE. I can run the project with no problems on local and even on the google GCP CLI. The problem right now is after the app is deployed to GAE successfully via gcloud app deploy , I'm getting the following error when opening the app. 2020-03-30 21:41:21.748 HKT Error: EROFS: read-only file system, unlink '/srv/dist/functions/next/BUILD_ID' Expand all | Collapse all{ insertId: "5e81f701000b6ba4e770be02" labels: {…} logName:

Google App Engine ModuleHostname: not an App Engine context

与世无争的帅哥 提交于 2021-01-05 09:24:28
问题 I am trying to discover other deployed services on the App Engine. Something like this article suggests. This is how my code looks like: import ( "fmt" "net/http" "google.golang.org/appengine" ) func ServiceHostname(serviceName string, r *http.Request) (string, error) { ctx := appengine.NewContext(r) hostname, err := appengine.ModuleHostname(ctx, serviceName, "", "") if err != nil { return "", fmt.Errorf("unable to find service %s: %v", serviceName, err) } return hostname, nil } I am calling

Google App Engine ModuleHostname: not an App Engine context

核能气质少年 提交于 2021-01-05 09:24:24
问题 I am trying to discover other deployed services on the App Engine. Something like this article suggests. This is how my code looks like: import ( "fmt" "net/http" "google.golang.org/appengine" ) func ServiceHostname(serviceName string, r *http.Request) (string, error) { ctx := appengine.NewContext(r) hostname, err := appengine.ModuleHostname(ctx, serviceName, "", "") if err != nil { return "", fmt.Errorf("unable to find service %s: %v", serviceName, err) } return hostname, nil } I am calling

How can I decrease deployment time of Node app on Google App Engine

会有一股神秘感。 提交于 2021-01-04 06:57:43
问题 Right now the time is around 10 minutes, but my app uses 2 minutes on npm install, which app engine does on every deploy, and then runs in about 5 seconds. Why does it take so long time, and is there any tricks that can be done to lower this? I have heard other places that this is because of changing routes, and that docker slows things down. But I would believe a company like google could manage to atleast cut this down to 1/3 of the current speed. There are some older questions, but I would

How to set environment variables using Google Cloud Build or other method in Google App Engine Standard Environment?

落花浮王杯 提交于 2020-12-24 07:47:28
问题 Is there anyway to inject environment variables from Cloud Build into the App Engine Standard environment? I do not want to push my environment variables to GitHub inside the app.yaml or .env . Thus, when Cloud Build pulls and deploys it is missing the .env file and the server is unable to complete some requests. I am trying to avoid using Datastore as the async nature of Datastore will make the code a lot more messy. I tried to use encrypted secrets found here, but that doesn't seem to work

GCP Cann't deploy with install pyodbc

可紊 提交于 2020-12-15 06:22:10
问题 I'm try to use GCP (Google cloud platform) : API Service with python project. And this project need to use lib : pyodbc for connect to MSSQL . In localhost it fine but when I try to deploy this project to GCP it show error like this. Can someone help me with this issue? 回答1: The machine that will run the app must have ODBC header files installed . To do so, you will need to deploy the app in a custom run time environment, where you install this header files before installing the requirements.

How to pass the env secret variable in google app engine and gitlab CI

别说谁变了你拦得住时间么 提交于 2020-12-15 04:26:23
问题 I am using gitlab and deploying it to google app engine for my nodejs application. Google Service access is added as variable in gitlab settings SERVICE_ACCOUNT_KEY: { "type": "service_account", "project_id": "node-us", "private_key_id": "", "private_key": "", "client_email": "gitlab-demo-service-account@node-us.iam.gserviceaccount.com", "client_id": "", "auth_uri": "", "token_uri": "", "auth_provider_x509_cert_url": "", "client_x509_cert_url": "" } .gitlab-ci.yml image: node:latest cache:

How Can I Return Specified Image Size From Google Cloud Storage With Node API?

|▌冷眼眸甩不掉的悲伤 提交于 2020-12-13 04:39:32
问题 I'm using cloud storage and it is working well, I just don't want to return the full-size image every time. I'm wondering if there is a way to specify a width to resize an image to when I request it? Here is the WORKING code. I just need to return smaller images, say, 300px wide (maintaining original aspect ratio). This number could change or fluctuate, so I don't want to save a ton of different versions at different sizes unless I absolutely have to. var fileName = "Image.png"; var stream =

Use private npm registry for Google App Engine Standard

邮差的信 提交于 2020-12-12 11:36:35
问题 For all the other stackoverflow questions, it seems like people are asking either about a private npm git repository or about a different technology stack. I'm pretty sure I can use a private npm registry with GAE Flexible, but I was wondering if it was possible with the Standard version? From the GAE standard docs, doesn't seem like it is possible. Anyone else figure out otherwise? 回答1: Google Cloud Functions allow you to access private NPM modules by providing credentials for the npm