I am trying to use GCP app engine custom runtime flex to start an angular application.
My app.yaml
service: web-ui
runtime: custom
env: flex
manual_scaling:
instances: 1
resources:
cpu: 2
memory_gb: 2
disk_size_gb: 20
My Dockerfile
FROM node:10
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . ./
RUN npm install -g @angular/cli
EXPOSE 8080
RUN npm run build --prod
COPY . ./
CMD ["npm", "run", "start"]
Serve:
package.json - ng serve
angular.json
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ds-ng:build",
"host": "0.0.0.0",
"port": 8080
When trying to access the service - I get INVALID HOST HEADER.
Application is working fine when ssh to App engine instance where docker container runs.
I tried setting handler in app.yaml. But still see same problem. handlers: - url: /(.*) static_files: dist/index.html upload: dist/index.html