Live data from Hacker News

Using git to manage a website

toroid.org

1–10 of 52 posts

Re: Using git to manage a website

#3
post #2

Is it bad, that I simply SSH into the server and do a "git pull"?

Good / bad are relative terms. Neither situation would be recommended for a site with a code base that pulls from multiple resources / pushes to multiple servers on every release, but for a single server environment this could suffice.

As for the difference b/w your method and the OPs, he defines it here :

> This is more convenient than defining your workstation as a remote on the server, and running "git pull" by hand or from a cron job, and it doesn't require your workstation to be accessible by ssh.

Re: Using git to manage a website

#6
post #5

Can I use git to manage a Drupal-managed website?

Why not? Were I work we use Drupal almost exclusively and use Git for everything.

Isn't the content stored in a database rather than static pages? Do you do regular commits of your database files?

Re: Using git to manage a website

#8

Can I use git to manage a Drupal-managed website?

that's what we do in conjunction with http://drupal.org/project/features, bugs aside it works well

but what you want in code and what you want in the DB will vary from page to page and feature to feature so often just manually redo stuff (in dev env and then again in production) because deploying changes by code is more effort then its worth.

Re: Using git to manage a website

#9
post #2

Is it bad, that I simply SSH into the server and do a "git pull"?

To elaborate on dolinsky and the article, if your web server is doing a "git pull", it means it has ssh access into your workstation. If someone breaks into your web server, this means that they have ssh access into your workstation as well by simply using the keys on your web server. This is bad, very bad.

If you push to your web server, only your public key is exposed if your web server is compromised.

Re: Using git to manage a website

#10
This is basically how I run my publishing engine (you can read more about it at the "Colophon" part of this article: http://nearthespeedoflight.com/article/about_the_redesign ).

I wanted to teach myself Ruby and I figured this was a great way to maintain a site, as I'm terrible with both SQL and security. Git solves security and DataMapper solves the SQL, and my Ruby lubricates the rest.

Post reply on HN