Swagger plugin issue on GCP - Strapi - google-app-engine

I'm using the Swagger plugin for Strapi. It works fine on localhost, but when I deploy to App Engine it fails.
When accessing the /documentation page from the Strapi admin panel on a GCP App Engine (Standard) instance, I am seeing the below errors in GCP logs and Page not found with a 404 error.
error Error: EROFS: read-only file system, open '/workspace/extensions/documentation/public/index.html'
The documentation plugin was installed in my LOCAL development environment and docs compiled before deploying to GCP App Engine. Locally it works fine.
Steps to reproduce the behavior
launch your Strapi project
active the Swagger documentation plugin
request the documentation locally (it will work)
upload the Strapi project to Google App Engine (gcloud command or whatever)
visit the documentation (https://YourGoogleProject.appspot.com/documentation/v1.0.0)
System
Node.js version: v14.17.6
NPM version: 8.1.2
Strapi version: v3.6.8
Database: MongoDB

Related

Deploy a React app to Netlify + AWS Amplify

So I have this normal React app that is deployed in Netlify.
Then I tried using AWS Amplify for my authentication. All went well in my local.
The problem is, I think I would not be able to deploy it properly to Netlify anymore because of the aws-exports.js that is dynamically generated. Or can I? Is it still possible to deploy a React + Amplify app to Netlify? Or I have no choice but to deploy it to AWS?
UPDATE: I was able to deploy it successfully on Netlify by commenting out the aws-exports.js in the .gitignore. The problem now is how could I have different version of the file for different environments (e.g. Dev, Stage, Prod).

Running NextJS on production azure app service?

I have a nextjs react website running fine locally, after I ran 'next build' I got a .next file. I tried uploading the contents to azure app services but when I visit the URL I get an error that I don't have permission to view this page.
From googling the issue I've found that I need to install something on the azure app service: https://github.com/MRCollective/nextjs-server-azuresiteextension - "Install the nextjs-server site extension (either via the Portal or programmatically via ARM)" but I don't understand what that means or where I can find it (extensions in portal and site extensions does not have nextjs-server)

Deploy ASP.NET Core 2.1 app to Google Cloud App Engine error: bad character range

When I try to publish an ASP.NET Core 2.1 Web Application to Google Cloud Platform App Engine I get the error gcloud crashed (error): bad character range.
I publish with the GCP Visual Studio 2017 extension and I get the above error.
I publish from the cmd with an app.yaml in my project and I get the above error.
In order to deploy the ASP.NET Core 2.1 web application to Google Cloud App Engine I added an app.yaml file with the following contents:
runtime: aspnetcore
env: flex
I did the following:
Added app.yaml with
runtime: aspnetcore
env: flex
Added it to csproj
<ItemGroup>
<None Include="app.yaml" CopyToOutputDirectory="Always" />
</ItemGroup>
And executed the command
gcloud beta app deploy ./bin/release/netcoreapp2.1/publish/app.yaml
However I got the error: gcloud crashed (error): bad character range
Anyone know what I am doing wrong?
I follow the following guide and still get the same error when I try method 1, 2 and 3: https://cloudplatform.googleblog.com/2017/10/4-ways-you-can-deploy-an-ASP.NET-Core-app-to-GCP.html
This issue is being investigated at the moment and a fix should be released soon. As a workaround, please downgrade your Cloud SDK version to 212.0.0 by running the following command:
gcloud components update --version 212.0.0
Downgrading the version of your Cloud SDK to 212.0.0 or lower works because it seems in version 213.0.0 some changes were implemented that caused an issue with the yaml parser used by gcloud.
In addition, please follow this Issue Tracker thread to get updates regarding the status of this issue.
You should navigate to the publish directory first and deploy from there. Make sure the app.yaml file is present in the publish directory.
dotnet publish -c Release
cd ./bin/Release/netcoreapp2.1/publish
gcloud app deploy

How to deploy create-react-app to Google Cloud

I have a frontend create-react-app and a backend API using Expressjs.
I deployed the backend API to Google App Engine successfully.
But now I need to deploy the create-react-app to Google Cloud and it becomes very confusing, I tried to google for a while and there is no true/recommended way for this.
At least I saw that other people suggested doing it in 2 ways:
Using Google Cloud Storage:
Run "npm run build" to create the "build" folder
Upload this whole folder onto a bucket
=> I see that there is one drawback using this way: When I tried to reload page 'url/aboutUs', it's not found. So I have to go back to 'url' then click the About Us link
=> I guess that the React Router that I'm using is not working with Google Cloud Storage
Using Google App Engine
=> People just talked about using it, but I can't find any guide/tutorial for this.
So what is the recommended way to deploy create-react-app to Google Cloud?
And can you please provide a tutorial for that?
Thanks.
You just need to configure the Cloud Storage bucket to serve index.html as the 404 page.
For Google App Engine, you can use serve or set up nginx to serve index.html in the build folder.

PhpStorm not reading app.yaml

I'm a PhpStorm newbie. I've setup my plugins for Google App Engine and I can run my pages and scripts locally fine. The problem is that I can't navigate to another page.
My app.yaml has an entry that says:
- url: /properties
script: properties.php
And my hyperlink to this page is simply:
Properties
When I run this site in GAE's launcher, the link works i.e. "properties" is requested and the yaml tells the server to serve "properties.php". When I run it in PhpStorm, I get a 404 error because it is is requesting "properties" which does not exist. This tells me that PhpStorm is serving php correctly, but not the GAE environment. Am I missing something?
EDIT:
It's worth mentioning that my project is being run with a Google App Engine configuration.
The SDK directory is: /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine
Python executable is: /usr/bin/python
And the 404 page says "PhpStorm 10.0.3" in the footer.

Resources