1

A similar question to Google App Engine - Deploy different folder with the same app.yaml, but more specific.

I'm attempting to deploy a MEVN stack application using Google App Engine's (GAE) NodeJS app process.

The application has the following general structure:

app
   - server
      - dist
      - node_modules
      package.json
      package-lock.json
   - client
      - dist
      - node_modules
      package.json
      package-lock.json
   app.yaml
   package.json
   package-lock.json

In an ideal world, when I run gcloud app deploy, I'd like for GAE to install the production dependencies for both my server and client folders (or sub-applications).

In attempting this, I've run up against a number of obstacles:

  1. GAE's file-system is read-only, so I cannot manually specify any commands to install the dependencies within each sub-folder (throws an error).
  2. In the app directory, I have toyed around with having another package.json file (as you can see in the above folder structure example) that lists the client and server modules as dependencies themselves. While this works to install all the dependencies for client and server, the node_modules folder that is created is then located in the app directory and thus unable to be accessed from within server and client.

I'm sure that what I'm looking for is possible by just having two GAE instances running simultaneously, one for client and the other for server.

But I'd like for this to be possible with just one GAE instance.

Any help is greatly appreciated!

0 Answers0