prawee/yii2-gae-web

使用 Yii2 在 Google App Engine 上创建简单的网站

安装: 5

依赖: 0

建议者: 0

安全性: 0

星标: 2

关注者: 2

分支: 0

公开问题: 0

类型:项目

dev-master 2018-03-09 04:18 UTC

This package is auto-updated.

Last update: 2024-09-12 06:04:07 UTC


README

使用 Yii2 在 Google App Engine (标准环境) 上创建简单的可部署网站

安装

$ git clone https://github.com/prawee/yii2-gae-web
$ cd yii2-gae-web
$ composer install

配置

更新本地环境变量

$ cp .env.dist .env

更新 GAE 的环境变量

$ cp app.yaml.dist app.yaml
$ cp uat.yaml.dist uat.yaml
# update configure on your local
$ cp cron.yaml.dist cron.yaml

更新本地配置

$ cp config/main-local.php.dist config/main-local.php

运行

localhost

$ php -S localhost:8080 -t web

localhost 与 Google App Engine

$ dev_appserver.py app.yaml

如何部署

# prod
$ gcloud app deploy
# uat
$ gcloud app deploy uat.yaml

查看

# local
GET localhost:8080
GET localhost:8080/site/login
GET localhost:8080/site/logout
# gae
GET https://<project-id>.appspot.com/site
GET https://<project-id>.appspot.com/site/login
GET https://<project-id>.appspot.com/site/logout