在app文件夹上移动config目录

有没有办法将app app(app / config)移到app文件夹上?
我想部署app 文件夹没有覆盖我的应用程序的多个实例上的配置文件。</ p>
</ div>

展开原文

原文

Is there any way to move config app (app/config) above the app folder? I want to deploy app folder without override config files on multiple instances of my app.

1个回答



我不确定这是否可行。 您可以做的是为config.php的always_load部分添加一组(一组)自定义配置。 您可以添加自定义路径,以便可以从任何文件加载它,甚至可以在应用程序之外加载。</ p>

虽然这(部分)解决了您的问题,但我可能会为您提供更好的解决方案: </ p>

您可以按环境配置应用程序。 APPPATH / config / production / * .php将覆盖您的默认配置。 如果您不想对此文件夹进行版本控制,可以将其添加到.gitignore。 如果部署过程足够智能,则可以配置为在部署之间保留配置文件。 要激活生产环境,需要将FUEL_ENV环境变量设置为生产。</ p>
</ div>

展开原文

原文

I am not sure if that is possible. What you can do is adding a (set of) custom config(s) to you config.php's always_load section. You can add custom paths so that it can be loaded from any file, even outside of your application.

While this (partly) solves your problem, I might have a better solution for you:

You can configure your application per environment. APPPATH/config/production/*.php will override your default configuration. If you don't want to version control this folder, you can add it to .gitignore. If your deployment process is smart enough, you can configure to preserve configuration files between deployments. To activate production environment, you need to set the FUEL_ENV environment variable to production.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问