This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

netsmertia
netsmertia

Hi, as per the client requirement he needs app deployed to google cloud app engine. I read different blog posts to do the same. There is no content available for octobercms and most of the posts are related to laravel.

I have figured out most of the things:-

  1. Need to create a local copy of octobercms with a app.yml that will be deployed with google cloud sdk.
  2. Cloud SQL database

I still need help on following:-

  1. Where to store user uploaded files? As per most of the posts the storage is linked with /tmp directory of instance and as per the google docs this is temporary storage per instance. I think it is okay for cache but not for the user files. I also read to use google cloud storage filesystem with following configuration with laravel project.

    'google' => [ 
    'driver' => 's3', 
    'key' => 'xxx', 
    'secret' => 'xxx', 
    'bucket' => 'qrnotesfiles', 
    'base_url'=>'https://storage.googleapis.com' ]

    This is from a article about deploying laravel on google app engine. Is it correct as the S3 is related with AWS?. Do I need to use some packages and configuration to work with octobercms or Is there a driver available for this?. Please clear I haven't used cloud storage with laravel/octobercms before.

  2. Do indeed to remove any package as mentioned in this post

Finally, remove the beyondcode/laravel-dump-server composer dependency. This is a fix for an error which happens as a result of Laravel's caching in bootstrap/cache/services.php.

composer remove --dev beyondcode/laravel-dump-server
  1. To run the migration on cloud SQL I need to use google SQL proxy with connected local setup of octobercms. It is fine for first deployment but I don't think it will work well for on going updates. Is there a better way to handle this.

Thanks in advance.

netsmertia
netsmertia

Update: After digging a lot I am able to connect with Google Cloud Storage with https://github.com/Superbalist/laravel-google-cloud-storage package for laravel. I had created a filesystem in filesystem.php config and also updated the cms.php config to use gcs disk created in filesystem.php.

Connecting with local setup of octobercms with cloud Sql working great as available in documentations. but connecting app engine instance with cloud SQL took 2 days (Still don't know It is the issue of incorrect us of inverted commas (") in app.yaml or enabling SQL API).

Now the issue is- The google cloud app engine (standard) instance is read-only and you can link storage to /tmp but the google cloud app engine (flexible) allows write but with limited permission. Octobercms show error enable to create cms cache files due to permission. I think this is because app engine allow file create with restricted permission model and October cms create a directory with 0777 (I really don't know with was the cause) Due to the deadline, I deployed the project on app compute.

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.