text 将Angular应用程序部署到谷歌云

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 将Angular应用程序部署到谷歌云相关的知识,希望对你有一定的参考价值。

// to build dist folder run this command in the npm terminal so it will create a dist file.
ng build --prod


//to change the project directory in the cloud shell.(From one project to another).
gcloud config set project desired-project-id-here



// After uploading the app.yaml & dist folder to the bucket(gbox-2018)
// open the google cloud shell and create a directory(any related name) with the below command.  
mkdir mygbox-angular

// After creating the directory, sync all the files from bucket(gbox-2018) to 
// the new created directory in the cloud shell console by using the below command. 
gsutil rsync -r gs://mygbox.io/angular-gbox ./mygbox-angular

// After that you are ready for deploying the app by using the below command.
// specify the path where the app.yaml file is available,
// at present the console know that the file is there in the google shell console - angular-app-gcp folder 
gcloud app deploy ~/mygbox-angular/app.yaml

//now it will ask you to specify the location where you wan to deploy,
// there will be a list and select one from the list by specifing the sl.no.
deployed to europe-west  [4].

// You can stream logs from the command line by running:
  $ gcloud app logs tail -s default

// To view your application in the web browser run:
  $ gcloud app browse

// mygbox web link.
https://gbox-2018.appspot.com/

以上是关于text 将Angular应用程序部署到谷歌云的主要内容,如果未能解决你的问题,请参考以下文章

使用 docker-compose 将 Docker 映像部署到谷歌云运行

如何将 nodejs 应用程序部署到谷歌云?

将 node.js 应用程序部署到谷歌云平台时找不到模块“yargs”错误

如何使用谷歌应用引擎将 php 项目部署到谷歌云中?

如果我将 Spring Boot 应用程序部署到谷歌云,我应该使用应用引擎还是计算引擎 [重复]

如何使用芹菜工人将 django 项目部署到谷歌云?