2

TL;DR:

  • Assets, partials, layouts, gem configurations, other code shared among apps
  • Different database for every app
  • Ability to update codebase across all apps at once, not affecting custom code on client's site

  • Apartment? Rails Engine? CDN?

I'd like to have certain elements (admin navbar and sidebar, devise configuration (aside from :host), as well as other bits) available on all of my client's sites. That's great and all, but I'd also like to be able to update my codebase in once, and push it out (preferably with git), to ALL of my customer's sites, to insure they have the latest code I've written.

I've been looking into creating an Engine for base functionality and creating a CDN for assets, but I'd still manually have to do any interface changes (such as adding a link in the admin navbar) by hand with every customer's project.

Can apartment solve this problem, and still allow each customer to have their own unique codebase/git repo that I use for their own website?

I know I'm not doing the best job of accurately describing my issue, so if you'd like me to clarify anything, please ask.

Any reading material would be appreciated.

EDIT: I should add I'm currently using Deis on an AWS cluster for production.

foxtrotuniform6969
  • 3,527
  • 7
  • 28
  • 54
  • 1
    You seem to be asking many different questions. Apartment is just about multitenancy. That can give a subdomain for each account holder, like client.example.com. Connecting to a different DB for each account is a different problem that requires a different solution. The same goes for CDN integration and deployment. – Archonic Sep 06 '15 at 20:51
  • 1
    There's virtually no way that both you and your customers are able to edit the code of the website(s) and still be sure nothing will break. Not just in Ruby/Rails, this is just absolutely impossible to achieve. – Mike Szyndel Sep 06 '15 at 21:31
  • 1
    @MichalSzyndel I apologize if the question was a little confusing. I will be the only one editing the code. Ideally, the client will set the name of the site as well as the subdomain inside a different application. The application will then create a new App on the Deis cluster and push a skeleton rails app to it, create and seed the DB. – foxtrotuniform6969 Sep 09 '15 at 17:21
  • 1
    @MichalSzyndel I'd also like most of the code to come from a 'core' repo(such as devise configuration, models and controllers, the admin bar and sidebar in the views, etc.), while other parts (the rest of the views, and parts of the code that differ from the 'core') to belong to a separate repo. – foxtrotuniform6969 Sep 09 '15 at 17:30
  • 1
    It sounds like you want to be maintaining separate rails apps for each client, but have each app source from a central repository (that can be easily updated) for certain elements of the app. Is this right? – Toby 1 Kenobi Sep 11 '15 at 16:51
  • Yes, generally speaking. I've thought about creating a gem, but I'm not sure if a gem will have the kind of reach that I need. – foxtrotuniform6969 Sep 11 '15 at 23:11

0 Answers0