基于Firebase功能的云通用角度超时

问题描述

我在firebase上部署了Angular Universal项目,并使用firebase函数为服务器端提供服务,也使用云构建来触发构建,这个问题只是在角度通用的服务器构建命令中卡住了,尽管有时它会一直重试,它也可以在本地工作,但有时在云上有时无法通过

云构建YAML

steps:
- name: 'gcr.io/cloud-builders/docker'
  args: [ 'build','-t','gcr.io/$PROJECT_ID/firebase','./dockerfiles/firebase']
- name: 'gcr.io/$PROJECT_ID/firebase'
  args: [ 'use','$_PROJECT_NAME','--token','${_FIREBASE_TOKEN}']
- name: 'node:12.18.3'
  entrypoint: npm
  args: ['install']
- name: 'node:12.18.3'
  entrypoint: npm
  args: ['install','--prefix','functions']
- name: 'node:12.18.3'
  entrypoint: npm
  args: ['link']
- name: 'node:12.18.3'
  entrypoint: npm
  dir:  'functions'
  args: ['install','-g','firebase-tools@latest']
- name: 'node:12.18.3'
  entrypoint: npm
  args: ['run-script','stage-browser']
- name: 'node:12.18.3'
  entrypoint: npm
  args: ['run-script','--debug','stage-server']
- name: 'node:12.18.3'
  entrypoint: npm
  dir:  'functions'
  args: ['run-script','copyAndRename']
- name: 'gcr.io/$PROJECT_ID/firebase'
  args: [ 'deploy','${_FIREBASE_TOKEN}']
timeout: 2000s

Firebase docker文件

FROM node:carbon

RUN npm install -g firebase-tools@latest

ENTRYPOINT ["/usr/local/bin/firebase"] 

建立日志的时间太长了,无法在此处添加

https://justpaste.it/30aoi

运行脚本命令

    "stage-browser": "node --max_old_space_size=16384 ./node_modules/@angular/cli/bin/ng build --prod --configuration=stage --aot --vendor-chunk --common-chunk --delete-output-path","stage-server": "node --max_old_space_size=16384 ./node_modules/@angular/cli/bin/ng run sf-mini:server:stage","copyAndRename": "node cp-angular.js",

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)