简体   繁体   English

Heroku上的Lithium PHP

[英]Lithium PHP on Heroku

I am trying to deploy a Lithium app on Heroku, but Heroku uses a read-only file system for apps. 我正在尝试在Heroku上部署Lithium应用程序,但是Heroku对应用程序使用只读文件系统。 This causes a problem with the app/resources folder. 这会导致app / resources文件夹出现问题。 I've tried looking for a setting the lithium config to change the path to this folder, but it appears to be hard coded. 我试图寻找设置锂配置以更改此文件夹的路径,但它似乎是硬编码的。

Can anyone recommend how to resolve this issue? 谁能推荐解决此问题的方法?

Lithium uses the /resources folder for writing temporary files such as logs, file caches, compiled PHP templates, etc. Lithium使用/resources文件夹来写入临时文件,例如日志,文件缓存,已编译的PHP模板等。

The path is configurable through Libraries::add() when the application is initialized. 初始化应用程序时,可通过Libraries::add()配置路径。 In config/bootstrap/libraries.php , you can replace your application's Libraries::add() call with one like the following: https://github.com/orchestra-io/sample-lithium/blob/master/app/config/bootstrap/orchestra.php#L10 config/bootstrap/libraries.php ,您可以使用以下代码替换应用程序的Libraries::add()调用: https : //github.com/orchestra-io/sample-lithium/blob/master/app/config /bootstrap/orchestra.php#L10

This configuration uses the system's temp directory, and checks for/initializes the subdirectories Lithium will use. 此配置使用系统的temp目录,并检查/初始化Lithium将使用的子目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM