Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appengine/flexible/wordpress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Engine bucket is named YOUR_PROJECT_ID.appspot.com. Change the default Access
Control List (ACL) of that bucket as follows:

```
$ gsutil defacl ch -u AllUsers:R gs://YOUR_PROJECT_ID.appspot.com
$ gcloud storage buckets update --add-default-object-acl-grant=allUsers:R gs://YOUR_PROJECT_ID.appspot.com
```

### Create and configure a Cloud SQL for MySQL 2nd generation instance
Expand Down
2 changes: 1 addition & 1 deletion logging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $ php src/list_entries.php your-project-id 'your-logger-name'

To use logging sinks, you will also need a Google Cloud Storage Bucket.

gsutil mb gs://[YOUR_PROJECT_ID]
gcloud storage buckets create gs://[YOUR_PROJECT_ID]

You must add Cloud Logging as an owner to the bucket. To do so, add
`[email protected]` as an owner to the bucket. See the
Expand Down
6 changes: 3 additions & 3 deletions run/laravel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export ASSET_BUCKET=${PROJECT_ID}-static
* Create a Cloud Storage bucket:

```bash
gsutil mb gs://${ASSET_BUCKET}
gcloud storage buckets create gs://${ASSET_BUCKET}
```

### Setup Artifact Registry
Expand Down Expand Up @@ -257,7 +257,7 @@ The configuration is similar to the deployment to Cloud Run, requiring the datab

### Upload static assets

Using the custom `npm` command, you can use `vite` to compile and `gsutil` to copy the assets from your application to Cloud Storage.
Using the custom `npm` command, you can use `vite` to compile and `gcloud storage` to copy the assets from your application to Cloud Storage.

* Upload static assets:

Expand All @@ -269,7 +269,7 @@ Using the custom `npm` command, you can use `vite` to compile and `gsutil` to co

* Confirm the output of this operation

* You should see vite returning "N modules transformed", and gsutil returning "Operation completed over N objects"
* You should see vite returning "N modules transformed", and gcloud storage returning "Operation completed over N objects"

### Deploy the service to Cloud Run

Expand Down
2 changes: 1 addition & 1 deletion run/laravel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"update-static": "vite build && gsutil -m cp -r public/* gs://${ASSET_BUCKET}"
"update-static": "vite build && gcloud storage cp --recursive public/* gs://${ASSET_BUCKET}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While public/* works, it relies on shell globbing and will not copy hidden files (dotfiles) from the public directory. A more robust approach is to specify the directory itself with a trailing slash (public/) to ensure all its contents are copied recursively, including any hidden files.

Suggested change
"update-static": "vite build && gcloud storage cp --recursive public/* gs://${ASSET_BUCKET}"
"update-static": "vite build && gcloud storage cp --recursive public/ gs://${ASSET_BUCKET}"


},
"devDependencies": {
Expand Down