Settings

Theme

Ask HN: How do you push website updates to live?

3 points by rbarnes01 6 years ago · 5 comments · 1 min read

Reader

Hi everyone, I wanted to reach out to the community to see best practices for pushing updates to live sites.

I run an e-commerce site running a php shopping cart system. The way the shopping cart is structured is admittedly a bit complicated, which makes me nervous when I push live updates to the site.

Currently, I have a hosted dev site where I make changes, and when I'm ready for a release I manually change the files in the ftp. Not the best solution, especially considering a high chance of user error.

What is the standard practice for pushing updates? Git would make more sense, but implementation seems daunting. Any advice is appreciated!

smt88 6 years ago

> Git would make more sense, but implementation seems daunting.

Do you use version control now? If not, do it immediately. Initiating a git repo is very easy. You can use a boilerplate repo if you don't understand how gitignore works[1]. You should also look into gitattributes files.

If "implementation" means "deploying from a git repo", there are a million tools to do this. It's built into GitHub and BitBucket now, but you can also use Elastic Beanstalk or CodeDeploy on AWS. Azure and GCP have similar tools.

> What is the standard practice for pushing updates?

Bare minimum is having a way to trigger a deployment from a particular commit in git.

Best practice would be a full CI/CD server. It sounds like you probably don't have unit or end-to-end tests, but if you did, the CI/CD server would run the tests on any individual commits and report errors to you.

You could have manual or automatic deployments based on the latest commit on certain branches.

There's a lot to understand and unpack here, but there are also a ton of SaaS products to make it easier.

Honestly, though, you're a lot better off just moving to Shopify...

1. https://github.com/Partyschaum/php-boilerplate

  • rbarnes01OP 6 years ago

    Thanks for the response, I really appreciate it. I'll look into the tools you suggested. Our current processes are archaic and overdue for an upgrade.

    > Shopify I wish I could -- my industry requires some custom work that Shopify can't provide. It's frustrating, but I'll admit it's refreshing to be exposed to these new challenges. I guess I'm just a bit late to the party :)

davismwfl 6 years ago

Keep it simple, if it is only you making changes and your primary business is selling on the site and not the software then just use something like rsync or ssh/scp etc and script it. At most use something like ansible, chef or puppet.

If your primary thing is the software and you are deploying many times a week, then it can make more sense to have more sophisticated controls, but even then as one person a few scripts is usually plenty good enough.

If your primary business is the products you sell and not the software, I would be curious why you chose to build a shopping cart/e-commerce solution. There are so many good solutions out there it is usually just a distraction to build your own unless you have hit a large scale or are in just such a custom niche that nothing works for your product/service unless you write it.

  • rbarnes01OP 6 years ago

    Primary business is selling products, and we have been building off an existing solution because of regulatory requirements.

    Fortunately when everything is complete we would only need to focus on upkeep and maintenance, but it would be nice if we set a system in place now to avoid pain down the road.

    • davismwfl 6 years ago

      Cool, yea regulatory is one of those niche things that can require a custom solution for sure.

      I personally like Ansible especially when going from manual to automated as you can incrementally add to it but get using it quickly. Overall Ansible is pretty simple and it is super flexible without adding unnecessary complications. You can have it run your tests and make sure they all are passing before it moves the new software as live.

      Plenty of consultants are available and can set it up for you if you need it done fast or it really isn't hard to learn if you have a little time.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection