I explain how we combined 3 applications which had very similar code bases (started as forks from each other), but were deployed separately. In the new architecture, multiple customers are served from the same application. Data separation at the database level is managed with PostgreSQL schemas and the apartment gem. There is also separation on the file system (e.g. uploads) and some intricacies around the configuration of background jobs, email delivery and caching. In the end I also show how one can still customize the design, translations and even features for each tenant.