'How do I ensure that using `gcloud app deploy` is using my build folder not my dev files?
I am new to google app engine. I have a react app
Before deploying to production I use npm run build
which creates / updated the build folder. Then I push my app to app engine using gcloud app deploy
.
How do I know that the server is using the files in my build folder?
Is there something I should specify in my app.yaml?
Thank you!
Solution 1:[1]
You could create an NPM script to first change into the desired build
directory when deploying the App Engine app.
package.json
"scripts": {
"app.deploy": "cd dist/app/ && gcloud app deploy app.yaml --project api-project-########## --version v2 --no-promote --verbosity debug"
...
}
Run the script:
npm run app.deploy
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |