where'd my css go? or: a call for advice
Posted by jacqui maher on May 07, 2008 at 08:55 AM
Huh, I somehow lost my custom CSS for this site. Probably when I was updating Simplelog… I don’t (obviously) have a very good, backed-up setup for my SliceHost. Argh!
This brings me to several questions I’ve been wanting to ask the world of talented developers I know (yes you!):
What are you guys using?
I’m curious about directory structures - should I put my sites in my home directory? /usr/local? /www?
What about version control? When you’re using third party apps (like SimpleLog) that are themselves hosted in version control systems like svn or git, do you then export or clone them and stick them in your own local SCM, or perhaps github?
Web servers? Is everyone on Nginx? What are your configs like for it? Did you use ErrTheBlog’s Nginx config generator to start off? I know some people who use LightSpeed and that looks snazzy.
And how about your dot files? I’m talking about .vimrc, .irbrc, .bashrc/.tchsrc/etc. I made a repo in my github acct for these, but it seems like overkill. How should I deploy that anyway? A lot of dotfiles go into their own directories, and I’m not sure how best to structure my repo for it.
There’s a lot of ground to cover here, I guess. Help :)
Comments
There are 4 comments on this post. Post yours →
I am old, so I still use Apache and use the old default dir for storing files (under the /home dir). I have /home mounted as a separate partition in the hope that it does not get blown away if something bad happens.
I use CVS still (shows my age and lack of willingness to update to Subversion due to lack of time). ALL config and dot files go in CVS. Since I use the granddad of all bloatware and editors Emacs, interfacing with CVS is simple.
Third party apps I do not retain copies of, I count on the developers to host that. I have the disk space, but it is not worth the effort to keep the apps.
Good luck!
Well each distro has their own favorite directory structure. On RH/CentOS I use /srv/www, /srv/svn, /srv/git and then various subdirectories from there.
I prefer Apache Worker 2.2.x with PHP running as FCGI and Mongrels for Rails although Passenger has been running well for me as well.
All my .files I had just stuck in a .tar.gz and stored on my host and download it when I need it on a new host. A git repo would be nice but I don’t really update them all that much.
I still haven’t come up with a perfect way to deal with third party apps. I use Mephisto so what I had done would be checkout the latest source to /srv/www/apps/mephisto/relesases/DATEOFCHECKOUT and then copy my settings/themes over and change a symlink for a testing subdomain to point there.
Once I’m sure it’s working I’ll change the symlink for the main domain. Most of that’s all done by a capistrano script.
Not perfect but at least for projects that don’t have smooth upgrade paths this seems to be a nice safe way.
The Mac way.
/Library/WebServer
-> Document (docroot for main site)
-> Rails (check out your git / svn Rails projects here)
-> CGI-Executables (other legacy crud)
OS X Server has Mongrel w/ mod_proxy_balancer already baked in. But you can use Passenger as well, obviously.
As for home dirs, my entire machine is backed up via Time Machine. That grabs all the /Library stuff too. I have thought about checking my entire /Users directory in a git branch, but am a bit put off by the fact I have under there many git repos checked out as well. Not sure what unexpected effects I might experience there (wasted disk space, for starters).
TextMate is my editor, which thankfully doesn’t leave a bunch of . file turds all over my home directory structure ….
Hello!
I really like /var/www
nginx, of course!
vlad + git for deploying
you clone your github repo locally, then move it over to the slicehost via scp to /var/git or (what I prefer) to /git. you can also clone it on slicehost from github, but then you have to set keys there.. and usually you won’t need access to GH from SH.
then locally besides origin (which is github), you add another remote (your slicehost server)
setup vlad and for deploying you do
git push [slicehost] && rake vlad:deploy
I also have my slicehosts server name in the hosts file, so I can just do “ssh boo”
regarding setting different users and permissions for deploying, mongrels etc. I tried that but hmm.. it was quite a mess.. have to earn how to do it right, but maybe for simple setups and if you’re alone, it’s not even worth it..
ok!
Post a comment
Required fields in bold.