i am working on a large symfony2 project which have eight bundles with different functionalities which are inter dependent(Ex: AdminBundle, UserBundle, StoreBundle etc..). Now i want to split my project into Admin and Main as below, So that i can maintain each in different servers(with same Database) and have separate server to maintain the user uploaded images and videos. Please guide me on this
Project_Admin
app
Src
vendor
etc..Project_main
app
Src
vendor
etc..Project_Assets
web
etc..
It's impossible to have only 1 project on differents server BUT multi symfony project which communicate together between servers.
Are you sure that you bundle is not interrelated with PHP code ? (entity, service, etc...). It's hard to do this but possible yes.
Your projects Assets must not be assets generate in deal with other because the others bundles is not on the same server.
You can based all your concept or communication inter bundle with API Rest. But if not you will have interdependant engine symfony between remote server.
Symfony generate lot of technical file for one project. If this files must be identical between other remote server it's impossible.
Your question deal with concept implementing in Java with share logic on differents server (WebServer and AppServer). Perhaps idea of implementing your question with this.
You also can design your architecture around the template concept. All bundle all a remote bundle which used for generate render WebPage. With this you bring apart the assets and all visual logic on your others bundle.
Your question is not easily possible with standard concept of Symfony without lot of work...But You can integrate the same bundle in others remote project symfony and keep version of code exactly the same. With this you can easily share 1 website in lot of remote project symfony. Example : Corporate part of site in 1 server and backend part in other server if Corporate and backend is not very interrelated.
In deal with database I thing that is not very difficult because (and IF) the data is agnostic of your technical logic process (which is more apart of PHP code)
One method would be putting non-application-specific code into bundles that are treated like other 3rd-party bundles that would be installed to the vendor/
directory. So for instance, say your company name is Acme, you might create namespaces for each bundle such as Acme\StoreBundle, Acme\CommonBundle, whatever you like. These would all be versioned in your composer.json
and install to directories like vendor/acme/store
and vendor/acme/common
.
From there, make 2 applications, one for your Admin and one for your Main where you would place the application-specific code.