Closed cbdelavenne closed 6 years ago
config/db.php
, config/web-gae.php
and env_variables section in app.yaml.dist
However, in the flexible environment, the project ID (app ID) is specified either:
By using gcloud init when you install the Google Cloud SDK. To view the default project ID of the gcloud tool, run gcloud config list. By using the gcloud config set project [YOUR_PROJECT_ID] command to set the default project ID of the gcloud tool. By using the --project flag when you deploy your app, for example: gcloud app deploy --project [YOUR_PROJECT_ID]
@patrick-yi-82 Thanks for getting back to me some quickly!
I was reviewing all the file differences between the master
and advanced
branched and identified:
config/web-gae.php
, web-local.php.dist
, models\PhpErrorHandler.php
, web/.htaccess
, and .env.dist
);vlucas/phpdotenv
package to composer.json
;config/db.php
to make use of getenv
from the aforementioned package;app.yaml
to specify the environment variables to use on GAE;config/web.php
, nginx-app.conf
, web/index.php
.Most of it is self-explanatory and makes for local dev/testing use vs GAE deployment.
While configuring my .env.dist
file and renaming it to .env
, I realized I have a few additional questions:
# google cloud default credentials for local deployment
# https://cloud.google.com/docs/authentication/getting-started#setting_the_environment_variable
#GOOGLE_APPLICATION_CREDENTIALS=../your-credentials.json
Could you clarify?
# debug
section that lists a DEBUG_IP
(which I won't list here).
DEBUG_IP
?config/web-gae.php
and config/web-local.php
, you have the same comment come up twice:
// This configuration will be merged with web.php
// See index.php for detail on merging
What do you mean by this? Should I merge the contents of these files manually into config/web.php
?
GOOGLE_APPLICATION_CREDENTIALS By setting this env value, PHP Google Cloud library will automatically use that file as the default credential. (https://github.com/GoogleCloudPlatform/google-cloud-php#authentication)
DEBUG_IP will let you access Yii2 debug and gii module from that IP
In index.php, config from web-gae.php and web-local.php will automatically merge with config in web.php
$config = \yii\helpers\ArrayHelper::merge( require(DIR . '/../config/web.php'), require(DIR . '/../config/web-gae.php'), require(DIR . '/../config/web-local.php') );
Hello!
First of all, thanks for making this boilerplate of Yii 2 for GAE Flex. It's been super useful already! With that said, I had some questions regarding additional configuration settings.
cloudsql
connection name (i.e.your_project_name:your_region:your_instance
)?Most of my questions stem from following along the Google Cloud PHP Bookshelf App tutorial.