I need some direction because I am a bit lost currently. I have my create-react-app frontend that builds in a CI/CD pipeline into google app engine. It serves the app frontend properly on the proejct url eg.. https://project.appspot.com/. So the build works fine.
Now I would like to have a production and staging enviroment, where the staging is password protected (via a .htpassword file or the like) so staged changes can be viewed internally. Im not sure what the technical name for this type of dev, staging, production enviroment thing is or if it is even possible with what im trying to do. Would be nice if someone could point me in the right direction or knows the name of it so I can start googling.
Here is my cloudbuild file:
`steps:
- name: 'gcr.io/cloud-builders/git'
args: ['clone', '<GIT-URL>']
- name: 'gcr.io/cloud-builders/npm'
args: ['install']
dir: 'frontend-stage/'
- name: 'gcr.io/cloud-builders/npm'
args: ['install', 'react-scripts']
dir: 'frontend-stage/'
- name: 'gcr.io/cloud-builders/npm'
args: ['run', 'build']
dir: 'frontend-stage/'
- name: "gcr.io/cloud-builders/gcloud"
args: ["app", "deploy"]
dir: 'frontend-stage/'`
And my app.yaml:
`runtime: nodejs10
handlers:
- url: /(.*\..+)$
static_files: build/\1
upload: build/(.*\..+)$
- url: /.*
static_files: build/index.html
upload: build/index.html
- url: /.*
secure: always
script: auto`
Thank you very much!