点选Start Free (一个Mail帐号可以提供一个免费的Sandbox 512mb空间的MongoDB)
填写基本资料
选取Create a cluster 开始吧
选取Cloud的供应商,这边我们选择GCP,在选择GCP在台湾的机房,未来也可以依照你想要提供服务的区域进行相关的选择部属
选择M0 Sandbox,此为开发与测试环境,当需要部署到正式环境时可以修改设定即可不停机的状况下轮巡升级
进阶设定包含备份等机制,可以在这边设定,不过需要付费的才有。再输入Cluster 名称即可点下Create
这边如果选择付费的服务,则会显示价钱by hour 收费
接下来等待完成建置
建立DB使用者,并选取其角色 (https://docs.atlas.mongodb.com/security-add-mongodb-users/#database-user-privileges)
建立可连线到DB的IP白名单,很重要,建议一定要设定,避免被骇客加密勒索 (也可以设定CDN等网址进行授权)
回到Cluster,点选Connect,这里可以依照需求选取连线方式,透过AP连线可以取得连线字串,并且可以取得对应程序语言的SampleCode,是不是很方便呢!!
到这就完成MongoDB的部属
gcloud projects create PROJECT_ID
gcloud app create
runtime: go114 # or go112 or go113 for Go 1.12 or Go 1.13
instance_class: F2
env_variables:
BUCKET_NAME: "example-gcs-bucket"
handlers:
- url: /stylesheets
static_dir: stylesheets
- url: /(.*\.(gif|png|jpg))$
static_files: static/\1
upload: static/.*\.(gif|png|jpg)$
- url: /.*
script: auto
gcloud app deploy
gcloud app browse
ng build --prod
runtime: python27
api_version: 1
threadsafe: true
handlers:
# Initial route that will serve up index.html, main entry point to your app
- url: /
secure: always
static_files: {$ your app folder name}/index.html
upload: {$ your app folder name}/.*
# Routing for typedoc, assets and favicon.ico to serve directly
- url: /((?:assets|docs)/.*|favicon\.ico)
secure: always
redirect_http_response_code: 301
static_files: {$ your app folder name}/\1
upload: {$ your app folder name}/.*
# Routing for any js files
- url: /(.*\.js)
secure: always
redirect_http_response_code: 301
static_files: {$ your app folder name}/\1
upload: {$ your app folder name}/.*\.js
# Routing for any css files
- url: /(.*\.css)
secure: always
redirect_http_response_code: 301
static_files: {$ your app folder name}/\1
mime_type: text/css
upload: {$ your app folder name}/.*\.css
# Routing for anything (wild card) after
- url: /.*
secure: always
static_files: {$ your app folder name}/index.html
upload: {$ your app folder name}/.*
将Angular Build 的 dist 里面的资料夹和 app.ymal 上传
Deploy
gcloud app deploy
新建置的 WordPress 辛苦写了几篇文章,可是这时候跟本就不会被 Google 搜寻看到我的文...
这篇是 infrastructure 也可以 for each 第四篇,上次漏发了,今天补发 本章介...
有了前两天的人脸关键点侦测後,我们今天终於要谈到人脸对齐 (Facial Alignment)这个工...
var canvasBmo = document.getElementById('canvasBmo...
本篇同步发文在个人Blog: 一袋.NET要扛几楼?打造容器化的ASP.NET Core网站!系列文...