在尝试将我的OctoberCMS + sqlite(基于Laravel 5.5)部署到谷歌应用引擎时出现以下问题,这是我的部署错误:
...
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
这是我的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
这是我的数据库:
...
'default' => env('DB_CONNECTION', 'sqlite'),
...
'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', 'storage/database.sqlite'),
'prefix' => '',
],
...
我的GAE是灵活的环境,它应该能够在那里使用Framework和CMS,但不幸的是,这个错误不允许我在此服务上安装这个基于Laravel的CMS。
对此有任何帮助将非常感激。 感谢
答案 0 :(得分:2)
我认为GAE不支持并发文件操作,因为:
1)SQLite用C语言编写 2)SQLite需要本地I / O,App Engine运行时间不会给你
此处提及:https://www.quora.com/Can-I-use-an-offline-SQLite-file-in-Google-App-Engine-for-Java,issuetracker.google.com/issues/35895573和Open SQLite database on Google App Engine
答案 1 :(得分:0)
我不确定,但由于MySQL
因CMS尝试使用mysql_pdo
驱动程序查找数据而导致错误。
您能明确告诉环境我们正在使用sqlite
尝试在环境中添加
DB_CONNECTION = sqlite
env_variables:
# ADD EXPLICIT VALUE
DB_CONNECTION: sqlite
# Put production environment variables here.
APP_LOG: errorlog
#APP_KEY: LCG9E1xG5FQDMNauR8wWW3GTyB6Tj6Nv
STORAGE_DIR: /tmp
如果不起作用,则尝试添加硬编码值
'default' => env('DB_CONNECTION', 'sqlite'),
REPLACE THIS TO
'default' => 'sqlite',
请评论是否适用于您或面临任何其他问题。
答案 2 :(得分:0)
您收到的错误是由 SQLite 引起的,但这并不是您设置中唯一会阻止您在 App Engine 柔性环境中安装 OctoberCMS 的问题。
例如,OctoberCMS 还需要能够修改文件,为此您需要配置 Docker 容器。您必须设置运行时:自定义。