I have distributed the django web page to the app engine of the gcp standard environment, and now I want to distribute it including the marvinJS of chemaxon.
In order to use that app, you need to put the license in that path.
(home directory)/.chemaxon
However, I can't find the home directory of the distributed standard environment app engine.
Also, if you find it, how should you move the file?
App Engine standard is a packaged solution. You submit your code, it is compiled (if required) and packaged in a container (with Buildpack). You don't manage the environment, the home directory, the users,....
So, try to add your file in the root path of your code. You won't be able to put the file higher in the dir path..
Related
I am using imagekit.io CDN in front of Cloud Storage rendering with the next/image component. I had next/image working prior seeing online that it was not compatible with the GAE standard environment. This concerns me... even though it is working, I'm wondering if there is some kind of inefficiency because next cannot cache images outside of /tmp. next/image is kind of a magic black box to me.
next.config.js
const nextConfig = {
experimental: {
externalDir: true
},
reactStrictMode: true,
images: {
domains: ["ik.imagekit.io"]
},
distDir: "build"
};
module.exports = nextConfig;
Moving to flex is not an option right now. I need to know if I should move off next/image.
TL; DR Google App Engine Standard is not a great option for Next
As you've pointed out from the tutorial:
Nextjs Features like Image Component with Optimization, Incremental Static Regeneration requires nextjs cache folder to be read/written on runtime. But our Standard Environment has read and write access only to the /tmp directory.
Is not suitable to use next/image component on App Engine Standard due to the limitation that you could not write on runtime. This conclusion is based on the official documentation from both, Google App Engine Standard and NextJS
NextJS (next/image)
Images are optimized dynamically upon request and stored in the <distDir>/cache/images directory. The optimized image file will be served for subsequent requests until the expiration is reached.
Google App Engine Standard:
All files in this directory are stored in the instance's RAM, therefore writing to /tmp takes up system memory. In addition, files in the /tmp directory are only available to the app instance that created the files. When the instance is deleted, the temporary files are deleted.
This seems to be a common struggle between developers using some NextJS components that requires to write to the /cache folder running on App Engine Standard, as shown on this GitHub discussion:
Currently, the image optimiser caches images locally, in the servers filesystem, typically under .next/cache/images. While this is fine on some platform, it's not uncommon for managed deployment target to restrict write access to the filesystem (e.g. Google App Engine only provides write access to an in-memory /tmp folder)
...
Currently, the only option we have to use next image optimization within Google App Engine is to use a custom server, override the handler for _next/images with an handler that does exactly the same as the image optimizer
And on this GitHub issue:
Did you have a solution for this one? Considering moving our marketing site to AWS temporarily over this. Can't use next/image on GCP GAE.
If you really need to deploy to GCP GAE, you can set your application to a flex environment.
See also:
Anyone managed to use next/Image on GAE?
Excuse the naivety here, I'm new to GAE, and haven't been able to find much in the available literature / answers about the deployed filesystem's public status...
My question is quite simple:
Assuming a standard app.yaml config, are the files that get pushed to GAE with gcloud app deploy publicly inaccessible, unless exposed by (in the example of Node.js) an express endpoint?
I want to make sure sensitive data like key files (for reference in code) in our deployed bundle are not exposed, and that the local filesystem of a deployment is only accessible privately by the code itself.
Unless you work with the “static” files & dir directives no data should be made visible to outside users by Google.
Authenticated Admin users (youself) can see all files deployed to the server in the admin console unless you disable “code downloads” (which was available on legacy App Engine but seems to be removed now).
I'm a beginner on GAE and I was wondering if it was possible to add another page to it so the home page would be
"example.appspot.com"
and the second would be
"example.appspot.com/test"
I've already tried looking for something that helps but the answers aren't what I'm looking for.
Of course it is possible to add more pages. The configuration for defining the URL matchers depends on the language runtime that you are using.
For Java:
The deployment descriptor is a file named web.xml. It resides in the
app's WAR under the WEB-INF/ directory.
https://developers.google.com/appengine/docs/java/config/webxml
For Python:
A Python app specifies runtime configuration, including versions and
URLs, in a file named app.yaml
https://developers.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_About_app_yaml
I have an app which access an app folder on a per user basis.
I also want to be able to have a specific folder within my dropbox - which ALL users of my application can access the files within - kinda like a shared folder between every user on the app.
Is this possible - and how do you do it?
I believe this is simply an unsupported feature for dropbox - and will most likely be using amazon cloud instead.
I've deployed my first GAE application and I am getting "TemplateDoesNotExist" exception at my main page. It feels like my static directory content is not uploaded to GAE.
Isn't it possible that I update (appcfg.py update myapp/) all my files including the static ones and run it standalone on myappid.appspot.com ?
by the way here you can see the problem:
http://pollbook.appspot.com
PS: my app works perfect locally
Your templates should not be stored in a directory that you refer to as "static" in app.yaml. Static directories are for literally static files that will be served to end users by the CDN without changing. These files cannot be read by the templating engine. It works locally because the dev_appserver does not precisely emulate the production server.
Put your templates in a different directory like /templates or something. You do not need to refer to this directory in your app.yaml.