How can I deploy 2 rails apps from a single Git repo? -
i have 2 rails applications live inside same git repo.
there shared folder common logic lives.
- app_1 - shared - app_2 the shared folder symlink appropriate places inside app_1 folder. there shared_public folder symlinked app_1/public/files , app_2/public/files.
how can this? i'm open anything, it's clean slate. project never deployed previously, don't have existing infrastructure rely on. , splitting shared logic out (unfortunately) not option currently, because of timeframe have work with.
git
when mention shared folder symlink - only exists in operating systems, not git
since git deployment mechanism in instance (i.e place files repo onto server), you'll able following:
- initialize
gitrepo on server ($ git initon server)- clone
githubrepo locally (git clone https://github.com....on local box)- cd new folder , add server's repo remote
$ git push [server repo name] master
this isn't want, know.
it push files onto server - you'll following folder structure:
app1app2
the shared folder created on server itself.
if have appropriate server setup, should able running performing these steps
capistrano
if want use capistrano, you'll have little more involved, more push files server
if want use capistrano, you'll have split app1 , app2 separate applications, , deploy them individually. still allow create symlink on server, except you'll have different structure directories
Comments
Post a Comment