0

I got following issue when trying to deploy my OctoberCMS+sqlite (Laravel 5.5 based) to google app engine, here is my deployment error:

...
Step #1:   - Installing october/backend (v1.0.436): Downloading (100%)
Step #1:   - Installing october/cms (v1.0.436): Downloading (100%)
Step #1:   - Installing october/system (v1.0.436): Downloading (100%)
Step #1: Generating optimized autoload files
...
Step #1: > php artisan cache:clear
Step #1: Cache cleared successfully.
Step #1: > php artisan cache:clear
Step #1: 
Step #1: In Connection.php line 664:
Step #1:                                                                                
Step #1:   could not find driver (SQL: select * from "system_settings" where "item" =   
Step #1:   vojtasvoboda_errorlogger_settings limit 1)                                   
Step #1:                                                                                
Step #1: 
Step #1: In PDOConnection.php line 47:
Step #1:                          
Step #1:   could not find driver  
Step #1:                          
Step #1: 
Step #1: In PDOConnection.php line 43:
Step #1:                          
Step #1:   could not find driver  
Step #1:                          
Step #1: 
Step #1: Script php artisan cache:clear handling the post-install-cmd event returned with error code 1
Step #1: The command '/bin/sh -c /build-scripts/composer.sh' returned a non-zero code: 1
Finished Step #1
ERROR
ERROR: build step 1 "gcr.io/cloud-builders/docker@sha256:5836cd0f940f2f1a912b8fee4c74e5f1a84df92aab557c608a94e171e9df8d46" failed: exit status 1
Step #1: 
------------------------------------------------------------------------------------------------------------------------------------------------------

ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at https://console.cloud.google.com/gcr/builds/23c79228-9500-4c42-8bea-9b8076e30c42?project=1055473064866 Failure status: UNKNOWN: Error Response: [2] Build failed; check build logs for details

Here is my app.yaml

runtime: php
env: flex

runtime_config:
  document_root: .

# Ensure we skip ".env", which is only for local development
skip_files:
  - .env
  - Dockerfile
  - docker-compose.yml

env_variables:
  # Put production environment variables here.
  APP_LOG: errorlog
  #APP_KEY: LCG9E1xG5FQDMNauR8wWW3GTyB6Tj6Nv
  STORAGE_DIR: /tmp

Here is my database:

...
'default' => env('DB_CONNECTION', 'sqlite'),
...

'sqlite' => [
    'driver'   => 'sqlite',
    'database' => env('DB_DATABASE', 'storage/database.sqlite'),
    'prefix'   => '',
],
    ...

My GAE is Flexible env and it should be able to use Framework and CMS there, but unfortunately this error don't let me install this Laravel based CMS on this service.

Any help regarding this will be extremely appreciated. thanks

Yusuf Ibrahim
  • 1,591
  • 5
  • 21
  • 46

3 Answers3

2

I think GAE does not support concurrent file operation, because of:

1) SQLite Written in in C 2) SQLite would need local I/O which the App Engine running time would not give you

mentioned here: https://www.quora.com/Can-I-use-an-offline-SQLite-file-in-Google-App-Engine-for-Java, issuetracker.google.com/issues/35895573 and here Open SQLite database on Google App Engine

Yusuf Ibrahim
  • 1,591
  • 5
  • 21
  • 46
0

I am not sure but an error is due to MySQL as CMS try to find data using mysql_pdo driver.

can you explicitly tell the environment that we are using sqlite

Try adding DB_CONNECTION = sqlite in environment

env_variables:
  # ADD EXPLICIT VALUE
  DB_CONNECTION: sqlite
  # Put production environment variables here.
  APP_LOG: errorlog
  #APP_KEY: LCG9E1xG5FQDMNauR8wWW3GTyB6Tj6Nv
  STORAGE_DIR: /tmp

if it don't works then try to add hardcoded value

'default' => env('DB_CONNECTION', 'sqlite'),

REPLACE THIS TO

'default' => 'sqlite',

please comment if it is working for you or face any other issue.

Hardik Satasiya
  • 9,547
  • 3
  • 22
  • 40
0

The error you are receiving is because of SQLite, but this is not the only issue in your setup which will prevent you from installing OctoberCMS on App engine Flexible Environment.

For example, OctoberCMS also needs to be able to modify files and for this you need to configure the Docker container. You have to set runtime: custom.

You better follow a configuration tutorial: https://webmotion.medium.com/how-to-install-octobercms-laravel-application-on-google-app-engine-c77a9185f420