Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shopware5/SwagMediaGCP
Google Cloud Storage Adapter for Shopware
https://github.com/shopware5/SwagMediaGCP
gcp google-cloud-storage shopware shopware-plugin
Last synced: 3 months ago
JSON representation
Google Cloud Storage Adapter for Shopware
- Host: GitHub
- URL: https://github.com/shopware5/SwagMediaGCP
- Owner: shopware5
- License: mit
- Created: 2016-11-16T07:45:31.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-08T14:53:34.000Z (over 6 years ago)
- Last Synced: 2024-05-18T17:54:37.300Z (6 months ago)
- Topics: gcp, google-cloud-storage, shopware, shopware-plugin
- Language: PHP
- Size: 9.77 KB
- Stars: 4
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-shopware - GCP - Google Cloud Storage adapter. (Media Adapter)
README
# Google Cloud Storage Adapter for Shopware
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
The GCP adapter allows you to manage your media files in shopware on Google Cloud Storage.
## Building a package
Just run `./build.sh`.
## Install
Download the plugin from the release page and enable it in shopware.
## Usage
Update your `config.php` in your root directory and fill in your own values
```php
'cdn' => [
'backend' => 'gcp',
'adapters' => [
'gcp' => [
'type' => 'gcp',
'mediaUrl' => 'https://storage.googleapis.com/your-bucket-name/',
'projectId' => 'your-project-id',
'keyFilePath' => '/path/to/your/keyfile', // see below
'bucket' => 'your-bucket-name'
]
]
],
```### Credentials
The credentials will be auto-loaded by the Google Cloud Client.
1. The client will first look at the GOOGLE_APPLICATION_CREDENTIALS env var.
You can use ```putenv('GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json');``` to set the location of your credentials file.2. The client will look for the credentials file at the following paths:
- windows: `%APPDATA%/gcloud/application_default_credentials.json`
- others: `$HOME/.config/gcloud/application_default_credentials.json`If running in Google App Engine, the built-in service account associated with the application will be used.
If running in Google Compute Engine, the built-in service account associated with the virtual machine instance will be used.## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.