File tree Expand file tree Collapse file tree 5 files changed +62
-67
lines changed
appengine/flexible/laravel Expand file tree Collapse file tree 5 files changed +62
-67
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ env: flex
44runtime_config :
55 document_root : public
66
7- # required on some platforms so ".env" is not skipped
8- skip_files : false
7+ # Ensure we skip ".env", which is only for local development
8+ skip_files :
9+ - .env
910
1011env_variables :
11- # The values here will override those in ".env". This is useful for
12- # production-specific configuration. However, Feel free to set these values
13- # in ".env" instead if you prefer.
12+ # Put production environment variables here.
1413 APP_LOG : errorlog
14+ APP_KEY : YOUR_APP_KEY
1515 STORAGE_DIR : /tmp
1616 CACHE_DRIVER : database
1717 SESSION_DRIVER : database
@@ -20,7 +20,7 @@ env_variables:
2020 DB_DATABASE : YOUR_DB_DATABASE
2121 DB_USERNAME : YOUR_DB_USERNAME
2222 DB_PASSWORD : YOUR_DB_PASSWORD
23- DB_SOCKET : /cloudsql/YOUR_CLOUDSQL_CONNECTION_NAME
23+ DB_SOCKET : " /cloudsql/YOUR_CLOUDSQL_CONNECTION_NAME"
2424
2525beta_settings :
2626 # for Cloud SQL, uncomment and set this value to the Cloud SQL
Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ env: flex
44runtime_config :
55 document_root : public
66
7- # required on some platforms so ".env" is not skipped
8- skip_files : false
7+ # Ensure we skip ".env", which is only for local development
8+ skip_files :
9+ - .env
910
1011env_variables :
11- # The values here will override those in ".env". This is useful for
12- # production-specific configuration. However, Feel free to set these values
13- # in ".env" instead if you prefer.
12+ # Put production environment variables here.
1413 APP_LOG : errorlog
14+ APP_KEY : YOUR_APP_KEY
1515 STORAGE_DIR : /tmp
Original file line number Diff line number Diff line change @@ -73,23 +73,19 @@ private static function createLaravelProject($targetDir)
7373
7474 // copy and set the proper env vars in app.yaml
7575 $ appYaml = str_replace ([
76+ 'YOUR_APP_KEY ' ,
7677 'YOUR_CLOUDSQL_CONNECTION_NAME ' ,
7778 'YOUR_DB_DATABASE ' ,
7879 'YOUR_DB_USERNAME ' ,
7980 'YOUR_DB_PASSWORD ' ,
8081 ], [
82+ self ::execute ('php artisan key:generate --show --no-ansi ' ),
8183 getenv ('LARAVEL_CLOUDSQL_CONNECTION_NAME ' ),
8284 getenv ('LARAVEL_DB_DATABASE ' ),
8385 getenv ('LARAVEL_DB_USERNAME ' ),
8486 getenv ('LARAVEL_DB_PASSWORD ' ),
8587 ], file_get_contents (__DIR__ . '/../app-dbsessions.yaml ' ));
8688 file_put_contents ($ targetDir . '/app.yaml ' , $ appYaml );
87-
88- // copy over the base .env file
89- self ::execute ('cp .env.example .env ' );
90-
91- // generate the secret
92- self ::execute ('php artisan key:generate ' );
9389 }
9490
9591 private static function addPostDeployCommands ($ targetDir )
Original file line number Diff line number Diff line change @@ -53,14 +53,13 @@ private static function createLaravelProject($targetDir)
5353 $ process ->setTimeout (300 ); // 5 minutes
5454 self ::executeProcess ($ process );
5555
56- // copy in the app.yaml
57- copy (__DIR__ . '/../app.yaml ' , $ targetDir . '/app.yaml ' );
58-
59- // copy over the base .env file
60- self ::execute ('cp .env.example .env ' );
61-
62- // generate the secret
63- self ::execute ('php artisan key:generate ' );
56+ // copy in the app.yaml and add the app key.
57+ $ appYaml = str_replace ([
58+ 'YOUR_APP_KEY ' ,
59+ ], [
60+ self ::execute ('php artisan key:generate --show --no-ansi ' ),
61+ ], file_get_contents (__DIR__ . '/../app.yaml ' ));
62+ file_put_contents ($ targetDir . '/app.yaml ' , $ appYaml );
6463 }
6564
6665 private static function addPostDeployCommands ($ targetDir )
You can’t perform that action at this time.
0 commit comments