Skip to content

Commit f9a2245

Browse files
authored
feat: Laravel on Cloud Run (GoogleCloudPlatform#1680)
1 parent 1d11e68 commit f9a2245

File tree

94 files changed

+4398
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+4398
-0
lines changed

run/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
| Sample | Description | Deploy |
1010
| --------------------------------------- | ------------------------ | ------------- |
1111
|[Hello World][helloworld] | Quickstart | [<img src="https://storage.googleapis.com/cloudrun/button.svg" alt="Run on Google Cloud" height="30"/>][run_button_helloworld] |
12+
|[Laravel][laravel] | Deploy Laravel on Cloud Run | -|
13+
1214

1315
For more Cloud Run samples beyond PHP, see the main list in the [Cloud Run Samples repository](https://github.com/GoogleCloudPlatform/cloud-run-samples).
1416

@@ -87,4 +89,5 @@ for more information.
8789
[run_build]: https://cloud.google.com/run/docs/building/containers
8890
[run_deploy]: https://cloud.google.com/run/docs/deploying
8991
[helloworld]: helloworld/
92+
[laravel]: laravel/
9093
[run_button_helloworld]: https://deploy.cloud.run/?dir=run/helloworld

run/laravel/.env.example

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
APP_NAME=MyApp
2+
APP_ENV=local
3+
4+
# this value will be generated
5+
APP_KEY=
6+
7+
8+
# Logging
9+
LOG_CHANNEL=syslog
10+
LOG_DEPRECATIONS_CHANNEL=null
11+
LOG_LEVEL=debug
12+
13+
# Database
14+
DB_CONNECTION=mysql
15+
DB_SOCKET=/cloudsql/PROJECT_ID:REGION:INSTANCE
16+
DB_DATABASE=
17+
DB_USERNAME=
18+
DB_PASSWORD=
19+
20+
# Static (generate ASSET_URL from the bucket name)
21+
ASSET_BUCKET=BUCKET_NAME
22+
ASSET_URL=https://storage.googleapis.com/${ASSET_BUCKET}

run/laravel/.gcloudignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!include:.gitignore
2+
.git

run/laravel/.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/node_modules
2+
/public/build
3+
/public/hot
4+
/public/storage
5+
/storage/*.key
6+
/vendor
7+
.env
8+
.env.backup
9+
.phpunit.result.cache
10+
Homestead.json
11+
Homestead.yaml
12+
auth.json
13+
npm-debug.log
14+
yarn-error.log
15+
/.idea
16+
/.vscode
17+
package.lock

run/laravel/Procfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
web: pid1 --nginxBinaryPath nginx --nginxConfigPath /layers/google.php.webconfig/webconfig/nginx.conf --serverConfigPath /layers/google.php.webconfig/webconfig/nginxserver.conf --nginxErrLogFilePath /var/log/nginx.log --customAppCmd "php-fpm -R --nodaemonize --fpm-config /layers/google.php.webconfig/webconfig/php-fpm.conf" --pid1LogFilePath /var/log/pid1.log --mimeTypesPath /layers/google.utils.nginx/nginx/conf/mime.types --customAppSocket /layers/google.php.webconfig/webconfig/app.sock
2+
migrate: php artisan migrate
3+
static: npm run update-static

0 commit comments

Comments
 (0)