0

I have a nodejs non open source web application project that I want to deploy to a production server and/or a staging server. Is there a default way for this, or some tool that does it? I want to package all files needed and exclude the files not needed like the .git folder, the tests and other files like Gruntfile, package.json and so on.

I could of course manually package the files in a tar.gz file and send them to the correct server. But I was hoping to find a more complete and configurable tool that can do it for me.

Ludwig Magnusson
  • 13,964
  • 10
  • 38
  • 53
  • I find it curious that you want a deploy-tool but want to copy the files to servers manually. Normally one would use a deploy-tool that takes care of it all, for example capistrano. You might find some ideas in [this question](http://stackoverflow.com/questions/199277/best-practices-for-deploying-tools-scripts-to-production). – Andreas Hultgren Aug 27 '13 at 06:58
  • I don't want to do copy the files manually. I mean that I could solve the task of getting the files to the server in that way, but i _do_ want a tool for this. I'll check out your link and suggestion. – Ludwig Magnusson Aug 27 '13 at 07:00
  • Ah I see I completely misread that part. – Andreas Hultgren Aug 27 '13 at 08:14
  • Just as an FYI, I think keeping a package.json in your server might be a good idea. It allows your to maintain and do non breaking updates and keep a track of the versions of the npm modules you run. Plus, if you use have a git server, you can version your own app and update it as its packaged as an internal private NPM of its own. – Munim Aug 27 '13 at 09:18

1 Answers1

1

Might be not exactly what you're asking for, but i like git for automated deployment.

You could have branches like staging and production, which are checked out on the remote server.

You can set up a git hook like post-receive to update those remotely, every time you merge changes into those branches.

Here's a tutorial: http://wekeroad.com/2011/09/17/deploying-a-site-with-git-hooks

gherkins
  • 14,603
  • 6
  • 44
  • 70