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:
- 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).
- In the
app
directory, I have toyed around with having anotherpackage.json
file (as you can see in the above folder structure example) that lists theclient
andserver
modules as dependencies themselves. While this works to install all the dependencies forclient
andserver
, thenode_modules
folder that is created is then located in theapp
directory and thus unable to be accessed from withinserver
andclient
.
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!