Recess with multiple sites

27 views
Skip to first unread message

KevBurnsJr

unread,
Aug 14, 2009, 3:52:48 PM8/14/09
to Recess PHP Framework
I put together a screencast detailing how I use 1 copy of Recess for
many sites.

http://www.screencast.com/t/WBvHPV7Vc

Does this make sense?
Is there another way to do this that makes more sense?

- Kev

Kris Jordan

unread,
Aug 14, 2009, 4:10:43 PM8/14/09
to recess-f...@googlegroups.com
Kev this is great. If you don't mind I would love to post this to the blog.

The use of SET_ENV is clever, had not used that technique before.

A related mini-guide I wrote for working with Recess as a git-submodule of another project can be found here: http://www.recessframework.org/book/html/ch18.html#N111D9

Submodules per project does not avoid the redundancy you mentioned of having multiple copies of Recess floating around -- but it does have the upside of keeping all of the Recess GitHub files isolated from the application so your app can have its own git repository. Using a submodule also means on a project-by-project basis you can have different versions of Recess (and still issue commands like pull from within the submodule directory to bring it back in sync).

Joshua Paine

unread,
Aug 14, 2009, 4:26:11 PM8/14/09
to recess-f...@googlegroups.com
This is a good idea for dev. I maintain a separate recess-conf for dev
and production anyway (publish script handles sorting it out), so I
wouldn't even need to mess with the Apache config. I'd still need
something in my dev site apache configs to bring in the tools assets,
but I wouldn't need to complicate the production apache/lighttpd config
at all (since recess tools wouldn't be used in production). Should make
rsyncing or ftp syncing faster, too, since the recess files wouldn't
have to be considered.

As far as framework upgrades, you still have a per-site variable saying
where recess is, so nothing stops you from having all
of /recess_0.12 /recess_0.2 /recess_edge /recess_trunk_200908XX to
freeze individual projects to the same recess version they were
developed with. And if you've got more than one non-trivial project,
you'll probably want to do that pretty soon. E.g., recess 0.3 is likely
to be PHP 5.3 only, and maybe not all your hosts will offer it yet.

As far as a better way, on *nix it might be easiest just to use a
symlink--no config changes required. Git doesn't follow them by default,
so it shouldn't even alter one's git repository. On windows you can use
junction points, but I don't know what git or other scm do with those.

--
Joshua Paine
LetterBlock: Web applications built with joy
http://letterblock.com/
301-576-1920

Reply all
Reply to author
Forward
0 new messages