You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cloud_sql/postgres/pdo/README.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,13 +47,13 @@ $ ./cloud_sql_proxy \
47
47
48
48
### Set Configuration Values
49
49
50
-
Set the required environment variables for your connection to Cloud SQL. If you are using TCP mode as described above, do not set the `CLOUD_SQL_CONNECTION_NAME` variable.
50
+
Set the required environment variables for your connection to Cloud SQL. If you are using Unix Socket mode as described above, do not set the DB_HOST variable.
51
51
52
52
```bash
53
53
export DB_USER='my-db-user'
54
54
export DB_PASS='my-db-pass'
55
55
export DB_NAME='my-db-name'
56
-
exportDB_HOST='127.0.0.1'
56
+
exportDB_HOSTNAME='127.0.0.1'
57
57
```
58
58
59
59
Note: Saving credentials in environment variables is convenient, but not secure - consider a more secure solution such as [Secret Manager](https://cloud.google.com/secret-manager/) to help keep secrets safe.
@@ -66,28 +66,29 @@ $ php -S localhost:8080
66
66
67
67
Navigate towards http://localhost:8080 to verify your application is running correctly.
68
68
69
-
## Google App Engine Flex
70
-
71
-
To run on App Engine Flex, create an App Engine project by following the setup for these [instructions](https://cloud.google.com/appengine/docs/standard/php7/quickstart#before-you-begin).
69
+
## Google App Engine Standard
72
70
73
-
First, update `app.flex.yaml` with the correct values to pass the environment variables into the runtime.
71
+
To run on App Engine Standard, create an App Engine project by following the setup for these [instructions](https://cloud.google.com/appengine/docs/standard/php7/quickstart#before-you-begin).
74
72
75
-
Then, make sure that the service account `service-{PROJECT_NUMBER}>@gae-api-prod.google.com.iam.gserviceaccount.com` has the IAM role `Cloud SQL Client`.
73
+
First, update `app.standard.yaml` with the correct values to pass the environment variables into the runtime.
76
74
77
75
Next, the following command will deploy the application to your Google Cloud project:
78
76
79
77
```bash
80
-
$ gcloud beta app deploy
78
+
$ gcloud app deploy app.standard.yaml
81
79
```
82
80
83
-
## Google App Engine Standard
81
+
## Google App Engine Flex
84
82
85
-
To run on App Engine Standard, create an App Engine project by following the setup for these [instructions](https://cloud.google.com/appengine/docs/standard/php7/quickstart#before-you-begin).
83
+
To run on App Engine Flex, create an App Engine project by following the setup for these [instructions](https://cloud.google.com/appengine/docs/standard/php7/quickstart#before-you-begin).
84
+
85
+
First, update `app.flex.yaml` with the correct values to pass the environment variables into the runtime.
86
86
87
-
First, update `app-standard.yaml` with the correct values to pass the environment variables into the runtime.
87
+
Then, make sure that the service account `service-{PROJECT_NUMBER}>@gae-api-prod.google.com.iam.gserviceaccount.com` has the IAM role `Cloud SQL Client`.
88
88
89
89
Next, the following command will deploy the application to your Google Cloud project:
0 commit comments