Magento; private/public filesystem layer

大兔子大兔子 提交于 2019-12-23 01:42:45

问题


I want to split up the magento package in a private and public web directory. E.g. the private directory is reuseable on multiple projects, its just the app.

  • private/
    • app, downloader, includes, lib, pkginfo, var
  • public/
    • 404, js, media, report, skin + current root files (index.php etc.)

Im setting this up in SVN where just one copy of magento can handle various projects on different stages.

I've listed my first goals;

  • Private directory containing all the reuseable package parts
  • Public directory containing just local core code, package extensions, skins and API implementations
    • Downsizes working copies significantly
  • For db's im planning to use a piece of local code fixing the base url
  • Separate Zend Framework and other potential libraries
    • These should point to a global existing library directory (Zend is already here ;-))
  • Keeping magento's vendor source up2date
    • Packages are tagged untouched to ensure a proper update

Im not sure how to set up the flow in SVN from vendor source to separated directories.


回答1:


There's a few modifications you'll need to make to the way you've set things up:

  • includes should be in public - it is for storing compiled versions of the app files
  • var should be in public - all var files are going to be specific to each store
  • report should be in private

This setup also doesn't easily allow for installing extensions, which can place files anywhere in the Magento tree, including app and lib. The app directory in particular will almost always require customisations in etc/ and code/.

I think this would be a lot of work to set up and maintain but it's certainly an interesting exercise and may help with faster deployments if used as part of a standard deployment script.



来源:https://stackoverflow.com/questions/2238923/magento-private-public-filesystem-layer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!