oitmain-public / yii2-app-gae-flex

Yii2 App boilerplate for Google App Engine Flex Environment
Other
5 stars 2 forks source link
flex-environment gae gae-flex yii yii2

yii2-app-gae-flex

Create Yii2 basic application for deploy on Google App Engine (Flex Environment)

Flex Environment allows read and write on the directory sys_get_temp_dir(), which allows Yii2 to use the runtime folder

However, static assets are uploaded into Google Storage for public access

(Advance branch adds local environment support and pretty url)

Instruction for advance branch : https://github.com/oitmain-public/yii2-app-gae-flex/blob/advanced/README.md

Prerequisites

Installalion

Clone project and install composer requirements

$ git clone https://github.com/oitmain-public/yii2-app-gae-flex
$ # For Advanced app, clone following branch instead
$ # git clone -b advanced https://github.com/oitmain-public/yii2-app-gae-flex
$ cd yii2-app-gae-flex
$ composer install

Copy and update configuration files

$ cp app.yaml.dist app.yaml

Update config/web.php

Local Deployment

$ php -S localhost:8080 -t web/

Deploy to Google App Engine

See https://cloud.google.com/appengine/docs/flexible/php/testing-and-deploying-your-app

$ gcloud app deploy —version [YOUR_VERSION_ID] —no-promote —project [YOUR_PROJECT_ID] 

Google Cloud SQL

Troubleshooting