TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: how do you stage/push your code?

18 点作者 azarias超过 12 年前
I was wondering if you could share some best practices for staging and pushing code. Thank you.

11 条评论

ericclemmons超过 12 年前
We use capifony, a Symfony-tailored version of Capistrano.<p>Because our workflow utilized git flow, we do the majority of our work in feature branches, submit PRs, and then merge those to develop when TravisCI says it passes.<p>Once on develop, we "cap staging deploy" and run any final tests using Testacular, Selenium, or just by hand.<p>Most of the time, though, all we do is eyeball the code changes on develop, confirm tests pass in TravisCI, and do a release on master and then "cap production deploy".<p>Database migrations are handled automatically via Doctrine with each deployment with rollback support.<p>Sessions are pooled, and there haven't been any issues between releases. NewRelic is our primary indicator for a successful release.<p>Using this method, we deploy 6+ times a day, and haven't had the the time to automate it all yet :)
prodigal_erik超过 12 年前
The shop I just moved to has the usual roll-your-own mess, but the shop I just left did it right: "yum update". Making RPMs isn't hard, and it ensures appropriate versions of all dependencies are there (even stuff like syslog-ng configs), and their tiny overworked sysadmin team didn't have to know or care which language they're implemented in, or whether there's anything smuggled onto each box behind their backs, or how to bring a freshly-imaged box into production. They ran a small script to fake a health check failure on a few servers at a time to do it without load, because they didn't want to reserve the footprint to run two versions of an app server in parallel on each box.
zengr超过 12 年前
I have a simple setup for my pet projects: 1. Push code in github 2. Run fab deploy (fabric)<p>Fabric pull the code from github, puts it in the server and restarts the services (mongo, nginx) if needed.<p>I took some inspiration from newblur's fabfile.py: <a href="https://github.com/samuelclay/NewsBlur/blob/master/fabfile.py" rel="nofollow">https://github.com/samuelclay/NewsBlur/blob/master/fabfile.p...</a>
评论 #4472298 未加载
pytrin超过 12 年前
We have a staging server which is a carbon copy of the production server, and is auto-updated via post-commit hook (SVN). Everybody tests on that server until no more issues are found, and then it is pushed manually to production.<p>If the push involves db schema changes, we'll take the production offline for the duration of the push, showing a "Be back shortly" page.
ninjastar99超过 12 年前
We've been using Beanstalk (<a href="http://www.beanstalkapp.com" rel="nofollow">http://www.beanstalkapp.com</a>) for a few months now to collaborate more effectively, and thus far pretty impressed. Great system, and they've consistently added new features often.
评论 #4472852 未加载
Sgoettschkes超过 12 年前
At work, we have different workflows from rsync and ssh into the machine, running a build script to git pull. For my pet project, I work with git push to the production server. Works pretty well with git post-recieve hook and phing (ant for php) targets to update dependencies (through composer) and doing some health checks.
jwatte超过 12 年前
After all 40,000 unit tests have passed, sync that version to prod with ssh tunnel. Rsync to new directory on all target machines in a rsync tree. Switch to new version by moving a symlink. Verify new version by looking at metrics -- if something is off, automatically switch back. Repeat up to 50 times a day ;-)
评论 #4472311 未加载
jrussbowman超过 12 年前
For unscatter.com its simply git pull then supervisorctl restart all, but that app isn't anything more than a some tornado app servers.
TYPE_FASTER超过 12 年前
Automate every step possible.
tiedup超过 12 年前
google app engine takes care of everything for me
indiecore超过 12 年前
Deploy? I just edit it live, I mean what could go wrong?