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
4
4
runtime_config :
5
5
document_root : public
6
6
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
9
10
10
11
env_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.
14
13
APP_LOG : errorlog
14
+ APP_KEY : YOUR_APP_KEY
15
15
STORAGE_DIR : /tmp
16
16
CACHE_DRIVER : database
17
17
SESSION_DRIVER : database
@@ -20,7 +20,7 @@ env_variables:
20
20
DB_DATABASE : YOUR_DB_DATABASE
21
21
DB_USERNAME : YOUR_DB_USERNAME
22
22
DB_PASSWORD : YOUR_DB_PASSWORD
23
- DB_SOCKET : /cloudsql/YOUR_CLOUDSQL_CONNECTION_NAME
23
+ DB_SOCKET : " /cloudsql/YOUR_CLOUDSQL_CONNECTION_NAME"
24
24
25
25
beta_settings :
26
26
# 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
4
4
runtime_config :
5
5
document_root : public
6
6
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
9
10
10
11
env_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.
14
13
APP_LOG : errorlog
14
+ APP_KEY : YOUR_APP_KEY
15
15
STORAGE_DIR : /tmp
Original file line number Diff line number Diff line change @@ -73,23 +73,19 @@ private static function createLaravelProject($targetDir)
73
73
74
74
// copy and set the proper env vars in app.yaml
75
75
$ appYaml = str_replace ([
76
+ 'YOUR_APP_KEY ' ,
76
77
'YOUR_CLOUDSQL_CONNECTION_NAME ' ,
77
78
'YOUR_DB_DATABASE ' ,
78
79
'YOUR_DB_USERNAME ' ,
79
80
'YOUR_DB_PASSWORD ' ,
80
81
], [
82
+ self ::execute ('php artisan key:generate --show --no-ansi ' ),
81
83
getenv ('LARAVEL_CLOUDSQL_CONNECTION_NAME ' ),
82
84
getenv ('LARAVEL_DB_DATABASE ' ),
83
85
getenv ('LARAVEL_DB_USERNAME ' ),
84
86
getenv ('LARAVEL_DB_PASSWORD ' ),
85
87
], file_get_contents (__DIR__ . '/../app-dbsessions.yaml ' ));
86
88
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 ' );
93
89
}
94
90
95
91
private static function addPostDeployCommands ($ targetDir )
Original file line number Diff line number Diff line change @@ -53,14 +53,13 @@ private static function createLaravelProject($targetDir)
53
53
$ process ->setTimeout (300 ); // 5 minutes
54
54
self ::executeProcess ($ process );
55
55
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 );
64
63
}
65
64
66
65
private static function addPostDeployCommands ($ targetDir )
You can’t perform that action at this time.
0 commit comments